Author Topic: laser weapon...  (Read 1385 times)

0 Members and 1 Guest are viewing this topic.

Hello everyone,

To those who are experienced with the source code, I am wondering how the laser was done for the Subach HL-7 weapon. I have noticed that it is drawn using the function g3_draw_laser() which is located inside the file: 3dlaser.cpp under "render". However, I wasn't able to understand the code. Can anyone kindly explain the code or the technique used? The basic idea that I have is that the laser itself uses a texture "newglo9.pcx" " and a glow effect is put on it (using the file: "2_laserglow03.pcx")
But what I don't understand is how are they able to make a rectangular texture like it occupies a volume. That is, if the texture was viewed from the edge, one doesn't see a line, but sees a 3d laser (as the file name is called). I am wondering how that was done.

Thanks for the help in advance.

  

Offline IceFire

  • GTVI Section 3
  • 212
    • http://www.3dap.com/hlp/hosted/ce
I'm just guessing that it scales the PCX file according to where its supposed to be viewed from.

If you view from the front...its the same image...just not as stretched.  You can see this if you make your own PCX file and make it incredibly recognizeable from one direction over another.
- IceFire
BlackWater Ops, Cold Element
"Burn the land, boil the sea, you can't take the sky from me..."