Jump to content

[0.90] Lazor System v35 (Dec 17)


Romfarer

Recommended Posts

I was out testing my new distance measuring lazor and i came across this! Apparently i am hitting something called 'Mun' and it is 1900 meter away. How can this be? If you look closely you can even see the lazor reflecting.

It\'s worth mentioning that this particular system sends out a lazor that goes 2500 meter. It is based on raycasting. So it cant possibly hit or detect things further away than 2500 meter.

Ninja\'d somewhat by Tosh, but: You might look at the layer mask you are using for the raycast, and what layer it is hitting in this case. The map view seems to be implemented by a set of planet objects in a normally-invisible layer. But these objects use a scaled-down version of the normal coordinate system, with the scale factor given by Planetarium.InverseScaleFactor, which is somewhere around 0.0001 I think. I wouldn\'t be surprised if you\'re hitting one of these scaled-down map view planets with your raycast, though I kind of thought they didn\'t have colliders. Anyway, you might be able to exclude these hits by appropriately setting the layer mask of your raycast.

Link to comment
Share on other sites

I wouldn\'t be surprised if you\'re hitting one of these scaled-down map view planets with your raycast, though I kind of thought they didn\'t have colliders.
You\'ll be surprised how many objects do have colliders, and how many invisible objects are in the game scene :). When I set up a camera with no cullingMask I had a hard time to comprehend what am I seeing. ???

And as for raycasting -- I\'ve ended up with something like this:

    // do not check DestructionCollider, ScreenSafeUI and 
// ScaledSpace layers.
int mask = 0x7FFFFFFF & ~0x1402;
if( Physics.Raycast( pos, dir, out r, range, mask ) ) {
...

I hope that the \'fake Mun\' is in ScaledSpace layer.

Link to comment
Share on other sites

Thanks guys, this information will be useful when i start on the lidar system.

How exactly do you set up a camera with no cullingMask? Why would you want another camera anyways?

And how exactly do i specify this layermask? I think i got to read up on hex....

Link to comment
Share on other sites

How exactly do you set up a camera with no cullingMask? Why would you want another camera anyways?
See Unity documentation on Camera.cullingMask :).

I tried to make a magnifying scope for my laser -- and failed. The picture we see in the game is the combination of three cameras\' output -- and I\'m not sure about the maths involved there :(.

And how exactly do i specify this layermask? I think i got to read up on hex....
Yes, definitely; see docs on Physics.Raycast.

Alternatively, you may just use the mask I posted above. It was good enough for me -- and most likely will suit your needs

:)

Link to comment
Share on other sites

screenshot57f.png

This white line (to the left of my test vehicle) is drawn whenever i go to a craft on the launchpad or load a craft from the tracking station. The craft has the lazor system installed of course. I am not drawing it. What is? And how do i stop it?

Link to comment
Share on other sites

Debug.DrawLine is only drawn if you\'re in the Unity editor and have Gizmos enabled, I think.

What video card are you using? What environment (Windows/.NET versions)? What plugins are you using?

Link to comment
Share on other sites

Debug.DrawLine is only drawn if you\'re in the Unity editor and have Gizmos enabled, I think.

What video card are you using? What environment (Windows/.NET versions)? What plugins are you using?

I have had Debug.DrawLine to show in the game before, i just can\'t reproduce it...

I\'m using a AMD Radeon HD 6850 on w7 and i\'m using .net4.0.30319. I got my own plugin and Tosh cart installed.

I just did a test and i discovered it is Tosh Cart that is drawing this line. Thanks for pointing me in the right direction. I\'m sure the ever vigilant Tosh will pick up this message soon. SORRY I WAS WRONG....did another test..it is the stock command pod that is drawing it.

Link to comment
Share on other sites

Sorry I have been wrestling with blender for hours, and it won, it wont display a texture with the right colours no matter what I try.

Ok I just tried the Lazor, I see that white stick thing as well, and when I leave the vessel and return the stick is under the capsule again.

For some reason I cant get a second craft into the game, KSP seems to think the Lazor equipped cart is on the launchpad even though it is at the far end of the runway, I\'ll try driving even further away and see if that helps.

I managed to destroy a piece of debris through Kerbin, maybe make a line of sight and range check?, and I have some red beams still firing even though I turned the Lazor off, they are targeted on something on the other side of the planet.

The whole system is pretty impressive even with only a brief look, I did find it hard to fit the Lazors on top of the crystals on the side of my craft though, they need quite a bit of precision to get them in place.

Finally got another craft into the scene, I had to drive 6.8km away though, I\'ll see if the Lidar works.

Lidar failed to hit the other craft (cart+pod) at a range of 8.1 meters, it hit the icon stack though, not sure that\'s a good thing, I think Lidar needs to be more methodical in its sweep rather than a random firing.

I got the cart targeted and I wanted to see what Scan did. but the option has vanished and I can\'t figure out how to get it back, I don\'t seem able to control all beams all the time, I have 4 of each colour equally spaced around the craft, but some fire the wrong way despite having line of sight.

Turned of tracking station and I have the blue beams going the right way now, still no scan option, I think I need an instruction manual :)

What\'s it mean when the red beam is blinking?

Link to comment
Share on other sites

Ok I just tried the Lazor, I see that white stick thing as well, and when I leave the vessel and return the stick is under the capsule again.

That white line shows up if i load up with only a capsule and a cart, so i doubt it is caused by my system.

For some reason I cant get a second craft into the game, KSP seems to think the Lazor equipped cart is on the launchpad even though it is at the far end of the runway, I\'ll try driving even further away and see if that helps.

Hmmm, i always have several crafts around the launch pad area, all with lazor systems. I just drive one down the ramp, then hit escape and then click on space center, hit the launch pad button again, and bring in another craft.

I managed to destroy a piece of debris through Kerbin, maybe make a line of sight and range check?, and I have some red beams still firing even though I turned the Lazor off, they are targeted on something on the other side of the planet.

There is no l.o.s check in the system atm. The self destruct has no l.o.s or range check. The only thing with range check is the range display that shows up when you have a green lead lazor.

The whole system is pretty impressive even with only a brief look, I did find it hard to fit the Lazors on top of the crystals on the side of my craft though, they need quite a bit of precision to get them in place.

I have had this issue as well and it is one of the reasons why i haven\'t done more with the modeling. The only way to solve it would be to make the parts bigger. For now i put a color crystal and a lazor on top of the craft, then put them on the sides.

Finally got another craft into the scene, I had to drive 6.8km away though, I\'ll see if the Lidar works.

Lidar failed to hit the other craft (cart+pod) at a range of 8.1 meters, it hit the icon stack though, not sure that\'s a good thing, I think Lidar needs to be more methodical in its sweep rather than a random firing.

I\'m really puzzled why you are having problems bringing more crafts into the scene, i have never ran into this issue, please explain further. Lidar is currently not set for detecting other vessels, that is handled through the Tracking station linkup, but i see your point and i will fix that.

I got the cart targeted and I wanted to see what Scan did. but the option has vanished and I can\'t figure out how to get it back, I don\'t seem able to control all beams all the time, I have 4 of each colour equally spaced around the craft, but some fire the wrong way despite having line of sight.

Turned of tracking station and I have the blue beams going the right way now, still no scan option, I think I need an instruction manual :)

Scan only shows up when you have the green lead lazor, it\'s still a work in progress and is just there for display atm. (no scan yet) I should have left scan out of the alpha2-3, sorry for the confusion.

What\'s it mean when the red beam is blinking?

The red blinking lazors is the target tracking system. They are supposed to deliver radioactive material onto the target so the targeting computer can track them and draw the crosshairs, that was the idea, but i take it it\'s not that intuitive :o

When i run my tests i have one lazor on top of the lazor system, with no attached crystal, then 4 red crystals side mounted + 4 lazors on top of those. I have the same setup for green and blue.

Target tracking is activated when you have the red lead lazor (big red button). Lidar is activated when you have the green lead lazor (green button) and the tracking station linkup is activated when you have the blue lead lazor. If you are not either running a red lead lazor or have target tracking running you wont see any crosshairs.

So the idea was to expand with even more combinations and you would configure the system by placing the lazors on the ship in VAB, bringing in only the systems you are interested in. I\'m just a bit stuck atm, but to that end your feedback is very helpful.

Link to comment
Share on other sites

The stick showed up for me with this craft:

Lazor top

blue crystal

red crystal

green crystal

Lazor base

RCS tank

4 green Lazors

4 blue Lazors

4 red Lazors

cart

I have no idea why I couldn\'t get another craft in the game, I just kept getting the message there was a craft on the launchpad, It is probably just KSP being strange.

How many Lazors do I need on my craft? Would it be okay to have the main system able to do everything (with the right crystals attached) but need side Lazors for things beside/behind and to increase the systems power?

Link to comment
Share on other sites

for me the white line also showed up with this craft:

cart, pod

and this craft:

pod, fuel tank, engine.

So right now to access all the features of the lazor system you need the following craft: 1 lazor on top, lazor system, pod, fuel tank, 3 red crystal + 3 lazor, 3 blue crystal + 3 lazor, 3 green crystal + 3 lazor, engine or cart.

If you\'d get everything with the main system there would be little point in adding things on the side. I also don\'t want a system where you can get everyything just by adding a whole lot of lazors on the ship, you should have to design the system for a few tasks in the vab. For example right now you can:


  • [li] run the system with only blue and red lazors if you only want to track celestial bodies.[/li]
    [li] only red and green lazors if you only want to track objects within 2500 meter[/li]
    [li] only green and blue if you want to track everything but only want a list (no graphical display)[/li]

So i wanted to expand on this to sort of specialze the systems.

Also note that right now the top lazor don\'t react to any color crystal so you can only make it red, green and blue. This is intentional. The idea was to have the color of this lazor determine what systems you can activate. If i add more color combinations i was planning to add another level to it so you could add a red, green or blue color crystal on top, then the color would mix and you would be able to access more system, but only within the red, green or blue spectre.(yeah it would probably be a good idea to have two top mounted lazors then.

But anyways it is only plans right now, if i cant get the system to make sense i\'ll have to shut it down :\'(

Link to comment
Share on other sites

It\'d be a shame to end development of this, I think you need to simplify the design and it\'s abilities, it will then be easier to work on.

Here are my suggestions, feel free to ignore it if it\'s crap :)

Have the basic Lazor fire a white beam, this will be your targeting beam, it can be aimed or told to search, it can show a list of things it\'s found, it can lock-on and track the target, or can be used as a floodlight, targeting is essential before any further colours can be used, you\'ll need a colour reset button.

Okay now you have targeting you need to focus on an ability, lets say Blue crystals are communication crystals (for example) I\'d switch on the blue beam and have new options.

For this example I want to tell a nearby ship to stop tumbling, so in the option panel I click to turn on the other craft\'s SAS, maybe I can tell it to point prograde as well.

I also want to scan the other ship, luckily I remembered to fit a green crystal in the VAB, so I turn that on, bugger now I have a yellow science beam, I don\'t want the targets orbital info, so I have to turn the blue beam off.

With the green beam I can see some of the parts of the target ship, but one green Lazor isn\'t powerful enough to show me more than a few parts, I needed more green Lazors so I could scan all of it.

Link to comment
Share on other sites

Hi Romfarer! What about combine you system with mechjeb and create laser guidance system?

P.S How to open new menu of laser system???

I have one laser, like this -

/\-lazor

||-Lazor blue cristall

/ \-Prototype lazor system

And i have only this buttons: AXIS, print, T2.

Link to comment
Share on other sites

I appreciate the comments sal_vager, i have started modifying the system and it\'s already making a bit more sense :)

Svga777...

Mechjeb is a completely different system, i\'m not sure if it is combineable.

Try this setup:

/\ Lazor

/ \ Lazor system

| | Pod

x| x |x 3 red crystals, 3 lazors \

x| x |x 3 greencrystals, 3 lazors | mount these on the side of a fuel tank

x| x |x 3 blue crystals, 3 lazors /

\ / engine or cart

Then you will be able to see everything the system can do.

Link to comment
Share on other sites

I appreciate the comments sal_vager, i have started modifying the system and it\'s already making a bit more sense :)

Svga777...

Mechjeb is a completely different system, i\'m not sure if it is combineable.

Try this setup:

/\ Lazor

/ \ Lazor system

| | Pod

x| x |x 3 red crystals, 3 lazors \

x| x |x 3 greencrystals, 3 lazors | mount these on the side of a fuel tank

x| x |x 3 blue crystals, 3 lazors /

\ / engine or cart

Then you will be able to see everything the system can do.

Thx, bro, working! :D

Link to comment
Share on other sites

I am working on a Remote Control module for my lazor system. I got the basics working, i can launch ships and set the torque remotely, advance stages and you name it. Except i can\'t figure out how to flip on the RCS! I discovered it is a global setting, meaning, if you have it on for one ship, it is on for all. I even tried to send keys as to activate it through the game ui but KSP didnt react happily to that....

How to i turn RCS on in code?

Link to comment
Share on other sites

Just being able to rotate and stage other craft would already be amazing, it\'d help for rendezvous and docking, if you can do stuff like activate the other craft\'s SAS and landing legs as well, wow you\'d really have something here.

Hopefully someone can help with the RCS, there must be a way.

Link to comment
Share on other sites

What is the problem? You turn it on on your ship, MechJeb also dies instead of turning it on automatically, it whould be a bit stupid but if you want to pseudo-dock you whould need it to steer on both crafts anyway...

Link to comment
Share on other sites

Last time I tried Mechjeb on an RCS equipped craft it failed to use the RCS and ploughed my ship into the Mun, what Romfarer is trying to do is operate another vessels RCS independently to the current ship, one use would be to deorbit a nearby ship or stage using it\'s RCS while it is in range.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...