Torch Light

I need to get a torch light effect.
How I must to set opengl parameter light?

And the light need to run back the camera.
Thancks.

hi.

You need a local light source with the spotlight parameters set to give you a cone of the desired dimensions.

You will need many vertices in the scene if lighting is to be sufficient to describe the shape of the light. If you don’t want a lot of vertices then you’ll need another approach, probably a projected texture is the best way. This involves using texgen and the texture matrix, and is quite complex. Do a search for OpenGL projected texture sample code on the web.

Cheers,Angus.