Such as homeworld, etc. The "Beam" is likely a simple quad stretched between two points, where the Z axis is always rotated to face the camera. (fyi I'm not certain the particle system would work in this case, as it's not as straightforward to generate an exact beam between two points, and I haven't had much luck generating a solid beam of particles. I might look into this a little more, though)
The challenges as I seem them are:
The texture will be stretched the longer the beam. I would likely want to tile the texture instead. A solid beam wouldn't matter, but a beam with energy waves would need to be tiled.
It seems like the beam's Z Axis would be rotated to face the camera, so you always see the full flat beam, not a flat poly if you are a low angle.
The way I think I would go about this is:
- Find the distance between the beam emitter and the target.
- Create a quad of that length, and the width of the beam.Not sure just yet how to tile the texture depending on the length of the beam/quad.
- Find the y rotation difference between the two points, and rotate the beam that amount.
- Do the same for the x axis.
- The Z rotation would depend on the location of the camera in relation to the Z axis...if that makes any sense. In my head...it almost seems like the beam's Z rotation will always be perpindicular to camera view angle.
Anyone have any suggestions on going about this?