PDA

View Full Version : Rotation, translation & lights



Hordeum
03-03-2000, 01:36 AM
I have a small program where I can move around with the camera by moving and rotating all the objects in the opposite direction. But it seems that the light source always stays in the same place, so it follows the camera. Since translate and rotate affect objects that are drawn after these actions, how could I get the light source to be positioned with rest of the objects?

Bob
03-03-2000, 10:50 AM
Hello

Seems like you are setting the lightposition before translation/rotation.

First you need to translate/rotate camera, then place light, and then render objects.

Bob