Jump to content

[0.90] Lazor System v35 (Dec 17)


Romfarer

Recommended Posts

bannerlazorsystem.jpg

Romfarer Lazor System UPDATED: December 17, 2014 : Version 35 Requires KSP 0.90

Lazor System is an advanced targeting and guidance system with a lot of functions bundled in subsystems which can be activated by placing colored lazors on your vessel. You can do a lot of stuff with Lazor System, not only targeting. It has Tractor Beams, Lazor Guided flight both for your vessel and attachable modules such as missiles, Fuel transfer, Graphical overlays for the map/flight-view, extensive vessel and planet/moon parameter readouts, just to name a few.

vabiconslazor.png

Basic operation:

To make Lazor System work you have to place at least one of the 3 main modules on your vessel. Additional and more powerfull subsystems are activated by attaching colored lazors. A full description of all of these functions follows in the subsystems overview below.

Every main module has two action groups enabled on default: "Custom01" for enabling mouse look (hotkey "1") and "Custom02" for changing the color (hotkey "2"). Mouse look is the most important as it is what you will use to aim the main lazor.

New feature: Docking Camera

Every version of the Lazor System main module comes with a built in docking camera which can be activated from any docking port attached to the vessel by right clicking on it. The camera has a crosshair display, indicating the straight forward direction of the docking port. To activate the extended displays, simply target the docking port you wish to dock with, using the stock KSP targeting system. When this is done 3 numerical displays will appear at the top middle and left center. These are, from the bottom up, the x and y angle from the docking ports forward direction to the target docking port, the relative velocity in the x and y direction and the x and y distance. The graphical displays are as follows: The white cross shows your alignment, and the red cross shows your relative speed. So when the stipled cross, the white cross and the red cross is on the docking port, then you are perfectly aligned for docking.

screenshot7qbf.png
 

Docking cam can also be installed as a separate module. This camera will operate just like the docking cam's enabled by Lazor System, but obviously doesn't require a Lazor System to be on to use, unless you add it to a vessel that has Lazor System. The camera module requires romfarer.dll and the PluginData from the Lazor System installation folder. To enable this, simply add the following to a docking port .cfg.


MODULE
{
name = LazorSystemDockingCamera
}

 

Subsystems overview (Guides and Tutorials): The main features of Lazor System

If you have placed colored lazors on your vessel, new system functionality will appear in the subsystems tab. The currently available systems are as follows:

Tracking Station linkup (blue lazors):

Activating this system will connect your Lazor System to the Tracking Station (the sattelite dish) at KSC. This will connect you to mission control and you will be able to see every vessel, celestial body and some other trackable elements in the KSP universe. All of these potential targets will show up in the Targets tab in the Lazor GUI. When active, you can send self destruct messages to any vessel and debris in the game. This is the ultimate debris clearing tool.

As of beta 9 this system also comes with an interplanetary transfer system which is designed to guide you with transfering between celestial bodies and comes with both a numerical and graphical display. To activate the graphical display, click the "Mao overlay" button and go to map view.

The transfer system will show 3 different types of displays based on what kind of hohmann transfer you are doing. Each of these displays comes with different values. Below is an explanation of what all the readouts mean.

From planet to moon (i.e from Kerbin to Mun)

  • ToF: Time of Flight. I.e. how long the transfer will take.
  • Phase angle: The angle between your vessel - orbiting planet - destination.
  • Departure median: If the orbits were non eccentric and co-planar (both orbits were circular), this is what the phase angle should be when starting your transfer burn.
  • Departure angle: This is what your phase angle actually should be when starting the transfer burn. This angle makes an approximation based on the eccentricity of the orbits. If the orbits are in fact circular, this value will be the same as the median.
  • ÃŽâ€V Departure: The change in velocity required to complete the transfer.
  • V Departure: The velocity required to complete the transfer

From Planet to Planet or Mun to Mun (i.e. from Kerbin to Duna or Mun to Minmus)

  • Departure Window: Time until the phase angle aligns with the Departure median.
  • ToF: Time of Flight. I.e. how long the transfer will take.
  • Phase angle: The angle between your orbiting planet - Kerbol (the sun) - destination.
  • Departure median: The planetary alignment required to start your eject burn.
  • Departure angle: This is what your phase angle actually should be when starting the eject burn.
  • Angle: The angle between your vessel - orbiting body - Kerbol
  • Eject Angle: What the value above should be when starting your eject burn.
  • ÃŽâ€V Eject: The change in velocity required to escape the SoI of your orbiting planet and create a connecting hohman transfer orbit at the exit point.
  • V Eject: The velocity required.

From moon to planet (i.e from Mun to Kerbin)

  • Insertion Alt.: The altitude of the orbit you want to end up with. (i.e. the altitude of your Periapsis.)
  • ToF: Time of Flight. I.e. how long the transfer will take.
  • V Eject: The velocity required.
  • Eject Angle: What the eject angle should be when starting your eject burn.

Requirements

Activated by BLUE lazors mounted on your vessel.

Tutorials:

Transfering from Kerbin to Mun:

Launch your vessel, open up the Tracking Station linkup in the subsytems tab and press the "Map overlays" button.

To complete this transfer your parking orbit around Kerbin has to be non eccentric (it has to be a circle). I.e. Apoapsis has to be almost the same as Periapsis. And your parking orbit has to have almost 0 elevation. Use the readouts in the Parameters tab and the green circle in the map overlay to help with this. The green circle will show up when you press "Map overlay" and go to map view. When you have done this your orbit should look something like the image below.

lazorsystemtransfermun.jpg

Wait until the red line (your phase angle) aligns with the cyan line (departure angle) and start thrusting in a prograde direction. Using the Lazor Guided Flight in "prograde" mode will help a lot here. The goal here is for your orbital velocity to reach the "V Departure" value in the numerical display. Or your transfer orbit reaches the mun's orbit. So while thrusting zoom map view out and watch your transfer orbit. If you have aligned everything up correctly you will see your transfer orbit connect with the mun through the patched conics system in KSP. When this happends, press X on your keyboard immediately to shut of your engines. It looks something like the image below.

lazorsystemtransfermun2.jpg

Transfering from Kerbin to Duna:

Before you start this transfer it is a good idea to go to map view and fast forward until the red line is close to the cyan line or in other words your phase angle is a few degrees bigger than the Departure angle. The departure window display will also give you a median estimate of how long this will take.

Then launch your vessel and assume a circular, non inclined orbit. In map view this may look like something like this. It is very important that your starting orbit has an inclination very close to 0 for this transfer to connect.

lazorsystemtransferduna.jpg

Now you have to wait until the planets align. Depending on your orbit warping forward and low orbits may take a looooong time. That's why its a good idea to launch at the right moment or set a high parking orbit. When this happends, you will see the cyan line on your map and when it is almost at Kerbins SoI its a good time to line up your eject angle.

In the image below my vessel is 6 degrees ahead of the eject angle. In this toturial i started the burn at 3 degrees ahead. Anyways, start thrusting until your velocity is somewhere around the "V Eject" value.

lazorsystemtransferduna.jpg

Then just like the kerbin - mun tutorial, zoom map view out and look at where the orbits will meet. If you have done everything right, your will see something like the image below.

lazorsystemtransferdunaw.jpg

It is entirely possible that the orbits does not connect. Most likely because the parking orbit had too much inclination OR the orbit of your target planet is inclined, eccentric or what not. In that case you have to do mid transfer corrections to connect the transfer. Doing that takes skill and experience but hopefully this system will get your on your way so it is easier to pull that off.

LIDAR (green lazors):

This is a short range light detection and range system (LIDAR). It will send out green lazor beams in all directions depending on which mode you have activated: Random, H90V90 (systematic vertically aligned scan) or Horizon (Systematic horizon aligned scan). Every time one of these beams hit something, that object or vessel is added to the Target tab.

Requirements

Activated by GREEN lazors mounted on your vessel.

Lazor Guided Flight (red lazors):

This system is essentially a semi-automatic auto pilot which will make it easier to fly your plane or rocket. It comes in two operating modes, one for airplanes and one for rockets.

For airplanes

Gives you a new control scheme for airplanes. It adds the ability to more precisely manage an airplanes yaw, pitch and roll factors either by keyboard or mouse input. In addition this system comes with a damping function which is designed to smooth out turbulence or inherent \'wobbliness\' of aircraft. This system also comes with a altitude maintaining mode. It is also possible to select a location on the global map and have the system fly your vessel there, making it an autopilot for airplanes.

For rockets

For rockets this system enables Romfarer SAS which is an extra powerfull sas system and directional SAS which will keep your vessel pointing in any direction you desire. For example, the retrograde function will keep your vessel pointing in the opposite direction of gravity, making it an ideal stabilizer when landing.

Requirements

Activated by RED lazors mounted on your vessel.

Tractor Beam (magenta lazors):

A tractor beam is a lazor that can repulse or contract (pull away or in) anything it points at. In the default mode (when hover or lift is not activated) it will apply force to anything the magenta lazors hits. Just aim the lazors with the directional buttons on the panel or have them follow the lead lazor by enabling the chase or lock mode (C and L buttons on the main panel).

The force applied depends on the values set by the two main sliders: Max force and Force. It follows newtonian mechanics so if you apply force to something, you will receive and equal amount of force at the point of origin.

Hover mode:

When this mode is activated the system will make your craft hover above the ground at a set distance. Point the lazors at the ground before you do this. Move up and down by pressing the â–¼ and â–² buttons or set the altitude manually.

Lift mode:

This mode is used for lifting or holding other vessels in place. It requires a target to be enabled.

On the top of the tractor beam tab is a set of buttons to manually move the lazors. The directional buttons and the reset button is probably what you will use mostly, but here follow a description of what the other buttons do:

Directional buttons: Moves the lazors in the given direction in relation to the vessel.

'O' button: Mouse-look mode. Press this button or default hotkey '1' to control the direction of the lead lazor with the mouse.

'L': When this is selected only the Leader will respond to rotation change.

'O': When this is selected all lazors BUT the leader will move.

'A': When this is selected all lazors will move.

'Safe Mode': Safe-Mode. Lazors will not hit the active vessel when this is selected.

'D': Dispersal mode: Forces the lazors to point/rotate away from the vessel.

'C': Chase mode: Makes side mounted lazors follow the direction of the lead lazor.

'L': Lock mode: Makes side mounted lazors hit what the leader is hitting.

'Reset': Resets the rotation of the lazors so they point straight forward.

Requirements

Activated by MAGENTA lazors mounted on your vessel.

Tutorial: How to use hover mode

1. Create a vessel in the VAB. Command pod + a fuel tank. Place the magenata lazors in groups of 6 on that tank.

2. When on the launchpad, point the lazors at the ground. Hit the hover button and adjust the altitude with the up and down buttons.

3. You can see how much force the beams are putting out on the display at the bottom of the tractor beam panel. If they are at max power, your craft is too heavy and you will need more tractor beams. It is also helpful to use Lazor guided flight in the "retrogee" mode. That way your vessel will automatically be facing upwards.

lazorsystemtractorbeamh.jpg

Tutorial: How to use Hover and Lift at the same time

It is possible to create a hover craft capable of lifting other vessels. To do this you have to use the configuration tab to activate two separate tractor beam systems. One for hovering and one for lifting. In the config tab, select the magenta lazor groups you want to use for lifting, then click the â–¼ button on each group. Then click the star button next to one of the unassigned magenata lazor groups to create a new group, select this group and press the button next to the unassigned groups to merge it into this group. Now you get a new tractor beam system in the subsystem list. So now you can use one of the system to make your vessel hover, and the other system to lift stuff.

lazorsystemtractorbeaml.jpg

Resource Transfer (yellow lazors):

Use this system to transfer any resource between vessels, remotely up to 10km. It requires a target to do this. When you have a target selected the red "No target" display will change to the name of the vessel you have targeted. You can see how much of each resource is available and how much capacity is left for both your target and the vessel you are flying. Then all you have to do is press the â–¼ and â–² buttons to transfer back and forth.

If no target is selected only the "Dump" button will be available. Pressing it will make the resouce in all your tanks deplete rapidly.

Resource transfer tutorial:

Target the vessel you want to transfer a resource from/to. (either by pressing "1" and clicking on it, or selecting it from the targets tab) Open up the resource transfer interface at Subsystems -> Engineering -> Resource transfer, and hit the â–¼ button. The selected resource will then automatically be transfered from your target to you.

In the screenshot below i am flying my sunbeam vessel. It uses a lot of energy so i connect to the generator/battery vessel to replenish the electrical charge quickly. The same procedure could be used to replenish liquid fuel or any other resource.

lazorsystemfueltransfer.jpg

Afterburner (yellow lazors):

As of version 14 afterburner has it's own button. Simply press the button and LiquidFuel will start to pour from your yellow lazors. If the fuel stream hits the engine (i.e. you are moving forward), extra thrust will be added to your vessel as the fuel explodes. Use with caution, too much thrust can rip your vessel apart. Afterburner is engaged with Subsystems -> Engineering -> Afterburner.

lazorsystemafterburner.jpg

Requirements

Activated by YELLOW lazors mounted on your vessel.

Lazor System main GUI panel:

From the main panel of Lazor System you can set the range of all the lazors, toggle mouse look on and off (if you prefer gui buttons over the action groups). It also shows what the system is targeting and what the main lazor is hitting. This is also where you will find the default functions that comes with the main module. You only have to put the main laor system module on your vessel to get access to these functions. Each function or mode is closely related to the color of the main lazor and there are four categories described below:

Support: (White)

This panel will list all Kerbals on your vessel. To the right of each Kerbal is a button (â–º) which is used to to teleport crew members out. If the main lazor hits a spot anywhere on the ground, that is where your Kerbal will be teleported. Any kerbal who goes on EVA from a lazor vessel will be implanted with a mini-version of lazor system which can be used to teleport back to the vessel again, among other things such as EVA view which is a first person view.

lazormainsupport.jpg

Attitude: (Red)

This panel contaions items related to the axis and orientation of your vessel. In the first section "Main lazor heading:" you can see where the main lazor is directed, represented as Bearing (the horizontal direction) and Mark (the elevation). All relative to the Global and Local axis which can be selected through the button with the same name. There is also a toggle button which is used to enable the green arrow on the map showing where your vessel is oriented.

In the next section "Axis configured as:" you can select which reference axis the system will use. It is mostly related to Lazor Guided Flight (LGF) as it will determine whether you will see the Plane or Rocket LGF system. For example, in the screenshot below i have taken my spaceplane into orbit using the Plane LGF system. In orbit this system does not work very well as it only affects the control surfaces on the plane. Therefore i will change the configuration of my plane to rocket using these buttons. This is also usefull when i will take my plane in for landing.

lazormainattitude.jpg

From the "Axis overlays:" section you can enable graphical overlays showing the orientation of your vessel. The button "Local" will for example show where the forward direction of your rocket is. This can be very usefull when you land rockets and want to make sure you pitch and yaw in the right directions. The "Global" button will enable an overlay which show the directions to North, South etc.

Scan: (Green)

This panel is the home of the built in scanning system which comes with every configuration of Lazor System. This system will send out a pulse in all directions. All objects within range of this pulse will be added to the target list. The energy requirement to use this scan is range/10. In the screenshot below i have landed next to "something" i found on the mun and i am using the scanning system to figure out what it is.

lazormainscan.jpg

Config panel:

This panel shows all lazors attached to your vessel. Here you can split subsystems up to for example. run a hovering AND a lifting tractor beam system at the same time. ▼ removes the lazor group from the subsystem. ▲ adds a lazor group to a subsystem if only one of the same color is activated, adds a new subsystem if none is activated. If you have two subsystems of the same color and want to add another lazor group to one of them, select 1 group in the subsystem you want to merge with and the ∈ (merge button) pops up for all unassigned lazors.

Targets Tab and Targeting:

Everything lazor system knows the location of, such as Vessels, Celestial Bodies, Objects or KPS locations, are displayed here.

  • Target list targeting: Use the blue Tracking Station Linkup system to populate the list. Click on the vessel in the Targets Tab. Press the target button at the bottom of that tab.
  • Manual targeting: Press hotkey "1" to enable mouse look mode. Click on the vessel you wish to target. Note: The range of the target must be within the lazor range. Set this range with the slider on the main panel.

Targets: Vessels, KSC buildings, Celestial Bodies, Objects

lazortargets.jpg

When you open up the Targets tab, it will show all vessels in the game and the buildings at KSC. Targets can be locked on to by the main system or passively tracked. Both of these functions will place a graphical marker on the targeted/tracked object. Various buttons will become available at the bottom of this panel, depending on what you have selected, such as the self destruct (S-D button), which will send a self destruct signal to the selected vessel/debris.

In order to show Objects on this list you must use the Scanning system or the LIDAR (green) subsystem. You may also manually add targets to this list by using the green lazor from the main module, or by selecting the targets by clicking on them in free-aim mode.

To see Celestial Bodies you must use the Tracking Station Linkup (blue) subsystem.

Locations:

lazortargetslocations.jpg

Lazor System will also track geographical locations. These are available in list form from the Locations section of the Targets tab. From this panel you can mark locations on the map. Each location you have marked will show up as flags attached to the planet you are viewing in the map view. There are 4 ways to add a location:

  • Select on map: Opens up the map view with a red cross overlay that displays the latitude and longitude coordinates. If you press anywhere on the globe when the red cross is active, it will add a location there.
  • This location: Adds the location your vessel is currently at to the display.
  • Lazor hitpoint: Adds the location your lead lazor is hitting to the display.
  • Manual input: Manually enter the coordinates where you want to add a location.

In order to edit or delete a location you have to select a location from the list, then an Edit and Delete button will show up.

All locations are stored in PluginData/romfarer/kps.txt. Each line represents a location. Copy locations into the text file and they will show up on your map the next time you load a vessel that has Lazor System installed.

Parameters Tab:

This tab displays anything you need to know about your vessel in 4 categories. Each parameter can be highlighted and some comes with a toggle button which will enable graphical overlays. For example you can show the velocity of your vessel as a vector overlay.

  • Surface parameters: Altitude from terrain, vertical speed, etc.
  • Orbital parameters: Orbit velocity, Apoapsis altitude, Orbital period, Eccentricity, etc.
  • Physical parameters: Mass, Pressure, GeeForce, etc.
  • Resources: Shows current and total amounts for each resource on your vessel. when highlighted it also shows flow rate and time until depletion/restoration.
lazorsystemparameters.jpg

Target Cam Tab:

Provides a secondary camera which is displayed in a gui window. If nothing is selected this will be the eye of the main lazor. If you have a target selected it will zoom in on the target. Click on the camera window to move the display in relation to the target. If you use the mouse wheel when hovering over it, you will zoom in and out. This camera also has built-in Nightvision and a few other filters. When you have a vessel or celestial body targeted, the target cam display will show usefull information about the target.

lazorsystemtargetcam.jpg

Achievements Tab:

Track your achievements in the game, such as mun landings, return missions, various orbits. This system will also track kerbals killed and vessels destroyed.

Modules Tab:

External aimable devices such as missiles, bombs and sunbeam will appear here.

Lazor Guided Weapons pack (image below is outdated)

vabiconsexamples.png

This package contains lazor guided missiles and bombs. These don’t require the Lazor System attached to the vessel in order to operate. However, when the system is present, they will either follow the main lazors direction or home to the target assigned by Lazor System.

This package is now called Lazor Guided Weapons pack and can be downloade from here

Sunbeam

vabiconssunbeam.png

Originally created by Tosh. This is a high powered laser which will overheat and explode anything it hits. Just like the missiles and bombs, this will work separately from Lazor System. When attached to a vessel with Lazor System, Sunbeam will receive control from the system and you can aim it with the mouse and fire using the left mouse button. This is enabled in the Modules tab.

Changelog v35 (December 17):

  • All plugins: 0.90 Compatibility
[snip]

88x31.png

This work is licensed under a Creative Commons

Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Edited by Vanamonde
v35
Link to comment
Share on other sites

Thanks, now i feel a lot better. ;D

The beam reflection is the core of the current system. It was my plan to use this as a manual targeting system. When the beam reflects, you know you have hit something. Surely one can make things hit anything automatically but it is a game and i imagined a situation where maybe atmospheric ...err...SOMETHING...made the automatic targeting system not work so the player would have to switch to manual targeting, perhaps a half automated version of it, where the system sends out a lot of beams, like a sonar and locks on to things it hits.

The 'volumetric light' is just line renderers. As i understand it Unity does not have a way to make volumetric light implemented in the system. I saw a unity add-on that claimed to have this implemented but it was a commercial add-on so i scrapped that method. I also looked into SunShafts, a unity pro feature, but i couldn\'t find it in the ksp resources. Maybe its possible to do with particles as well? Or a cone mesh with a gradient texture and transparent shader?

Again i\'m really unsure about the whole light thing, but if i decide to use it i definately think the light needs a trail to keep track of where it is facing, when it\'s not hitting anything.

Link to comment
Share on other sites

Maybe its possible to do with particles as well? Or a cone mesh with a gradient texture and transparent shader?
I use a transparent procedural cylinder for laser beam. I\'m not very happy with its look as it cannot display a ray gradually fading at its sides. I\'m still not sure how to implement a good volumetric light effect; either with a hundred coaxial cylinders (and a nasty color banding) or with some custom particle system (built-in KSP particles do not suit).

BTW if you wish your laser to detect water you can use something like

float groundHitDistance; // determine it with Physics.RayCast
Vector3 myPosition, myDirection; // where are we and what are we looking at

if( FlightGlobals.currentMainBody.ocean ) { // we have an ocean below
Vector3 geeDir = FlightGlobals.getGeeForceAtPosition( pos ).normalized; // straight down
float altitude = ( float ) FlightGlobals.getAltitudeAtPos( pos ); // altitude above sea level
Plane p = new Plane( -geeDir, pos + altitude * geeDir ); // create a plane at sea level...
Ray r = new Ray( myPosition, myDirection ); // ...and a ray to it.
float L; // ray length
if( p.Raycast( r, out L ) && L <= groundHitDistance ) { // ground is below an ocean surface
// do something about it
}
}

Link to comment
Share on other sites

@Tosh I read somewhere, someone was using a gradient shader on a cone and the trick was they were rotating it to face the camera, so the more transparent areas of the cone would always be on the sides.

So i take it water has no collider so i have to estimate where it is. Is there any lakes on Kerbin? Also, i can only detect water if it is the current main body? meaning my vessel is directly above it?

Link to comment
Share on other sites

@Tosh I read somewhere, someone was using a gradient shader on a cone and the trick was they were rotating it to face the camera...
...just as LineRenderer does.

But using shaders could worth a try... I need to learn ShaderLab.

So i take it water has no collider so i have to estimate where it is. Is there any lakes on Kerbin?

Yep, no collider; parts must float in the water rather than stand on it.

Lakes\'s surfaces are also at sea level.

Also, i can only detect water if it is the current main body? meaning my vessel is directly above it?
The body you are orbiting.

UPDATE. Don\'t listen to me, I hardly know what am I talking about :D. With FlightGlobals.bodies[] you can check any of them. Though you rarely need to raycast water surface at Kerbin when you\'re orbiting the Mun ;D

Link to comment
Share on other sites

Just to note; Lazor (;D) appears to be active even if it is off, and when I turned it off after use the window remained full size.

Hope this helps.

This is what happens when systems are not tested thoroughly before shipping. Thanks for the notice.

Link to comment
Share on other sites

It seems I have a decent volumetric light effect. A bit heavy though: drops FPS by up to 10% (e.g. from 24 to 22, or from 80 to 72-73, depending on graphics settings...)

index.php?action=dlattach;topic=11083.0;attach=18040;image

index.php?action=dlattach;topic=11083.0;attach=18042;image

I\'ll release it in 2-3 days.

Link to comment
Share on other sites

Nice!

but how come the edges (edges on the red cylinder) on the top image look like it is a very dark gray in stead of a black? What method did you use and why do you reckon the frame loss occurs? I read somewhere that frame loss is expected when transparent shaders overlap, but that doesn\'t seem to be the case here ???

...just did my first test with 6 lasers controlled by one UI. It turns out i need something to synchronize them all as my method to rotate up and down yields random directions....(Vector3.RotateTowards)

Link to comment
Share on other sites

but how come the edges (edges on the red cylinder) on the top image look like it is a very dark gray in stead of a black? What method did you use and why do you reckon the frame loss occurs? I read somewhere that frame loss is expected when transparent shaders overlap, but that doesn\'t seem to be the case here ???
That\'s 20 coaxial cylinders with increasing alpha :), each one containing about 100 triangles. So an FPS loss was more than expected; but I believe 10% is acceptable.

BTW this class can render cones as well ;)

And concerning frame loss -- I\'ll soon release a class for a commandPod with FPS meter (that white digits in an upper left corner).

...just did my first test with 6 lasers controlled by one UI. It turns out i need something to synchronize them all as my method to rotate up and down yields random directions....(Vector3.RotateTowards)
Make that Vector3.RotateTowards change just a private variable, then tell each laser to look at that direction (transform.rotation.SetLookRotation).
Link to comment
Share on other sites

That\'s 20 coaxial cylinders with increasing alpha :), each one containing about 100 triangles. So an FPS loss was more than expected; but I believe 10% is acceptable.

BTW this class can render cones as well ;) And concerning frame loss -- I\'ll soon release a class for a commandPod with FPS meter (that white digits in an upper left corner).

What class is this? And about the frame loss, what happens when you have 6-8 of those up? I bet the frames will spike when those things cross.

Make that Vector3.RotateTowards change just a private variable, then tell each laser to look at that direction (transform.rotation.SetLookRotation).

Better result and faster code. Thanks, I like it ;D

....I gonna scrap the whole light to laser idea and make it a separate module, its cool when you only have one laser but with with 6+, laser-only looks A LOT more fun ;D

Link to comment
Share on other sites

Could you maybe add functions that allow other plugins to read out the vector where the laser hits something and what it is (Ground, Water, Building, Craft) so it whould be usable as targeting system for other things (I was thinking of small guided missiles to shoot cables, can be useful in many situations when the duct tape is not long enough :D)

Link to comment
Share on other sites

Could you maybe add functions that allow other plugins to read out the vector where the laser hits something and what it is (Ground, Water, Building, Craft) so it whould be usable as targeting system for other things (I was thinking of small guided missiles to shoot cables, can be useful in many situations when the duct tape is not long enough :D)

Certainly. I\'m working on multi-laser support right now though...

Link to comment
Share on other sites

What class is this? And about the frame loss, what happens when you have 6-8 of those up? I bet the frames will spike when those things cross.
The class I wrote myself. See proceduralRay.cs in SUMBEAM plugin -- and imagine 20 of them.

Concerning 6-8 lasers firing simultaneously -- thanks for the notice, I really gotta check that before releasing ???

UPDATE: 8 gradient rays sometimes drop frame rate to 10 FPS. So there must be a PART.CFG toggle to switch back to simple rays :(.

Link to comment
Share on other sites

Now to mount a laser on the Comm/OWP I\'m using to scan the Mun for Monoliths, and then launch for the Mun! lot easier now with Mechjeb being able to do transfer orbits....

Any plans on making this multipurpose? Like how you can use a laser for burning and melting stuff, as a range finder, communications, some types of propulsion (http://en.wikipedia.org/wiki/Laser_launch), and as LIDAR?

Link to comment
Share on other sites

The idea is to make this a generic targeting system so it can control lasers, turrets, etc. So for example, right now the system allows for simple reflecting lasers. But later on it will be possible to add lasers that can burn things, check the range of objects, etc. If someone make a propulsion laser, that will 'hopefully' work too.

I already have some basic LIDAR functionality in the system and i\'m planning to add more.

Link to comment
Share on other sites

A laser that returned the distance to the target would be useful, you could use it for orbital rendezvous when locked onto a ship or use it as an altimeter when pointed at the ground.

If it were possible to keep other craft stationary and have the laser remain active on non piloted craft, this would make a very useful tool for lining up for docking.

Link to comment
Share on other sites

A laser that returned the distance to the target would be useful, you could use it for orbital rendezvous when locked onto a ship or use it as an altimeter when pointed at the ground.

If it were possible to keep other craft stationary and have the laser remain active on non piloted craft, this would make a very useful tool for lining up for docking.

It is very easy to add this to the system. I\'m just wondering how to do the lock-on part. Its easy to make it just follow the target but that seems like magic. I want the system to shoot multiple lasers to try to keep track of moving objects. Or maybe something totally different? Ideas?

Link to comment
Share on other sites

Well, maybe if you got a lock, the laser would be able to track it the same way a mouse laser tracks the surface you are using, it\'d see the surface move left and then tilt the laser left to follow it.

Or a prettier way might be to scan left to right then up and down like the laser at the start of Aliens, that\'d get you your bearing and you\'d rescan if you lost contact.

I\'m not sure really, how does a laser guided missile track it\'s target?

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...