To draw a laser bolt with arbitrary orientation in 3D, you can use a trick of drawing the bolt itself as a quad (oriented with the bolt at the mid-point of two of its sides) and then billboard half end-caps that stick out on either side of the bolt quad. With the right texture and mapping, it will look okay.

The texture to use would look something like this:
128x64 JPEG

The mapping from this texture to three quads should be divided something like this:
128x64 JPEG

The three quads you draw need to be oriented correctly towards the camera; something like this:
400x400 PNG

Once you start seeing the billboard head-on, you may wish to start pulling the yon quad closer to the camera, else you will start noticing that the sizes of the near and the far end are different.

If this trick helps you (or not), please let me know by sending e-mail to:
256x32 PNG


Back to the Graphics page.