-
Rotation, translation & lights
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?
-
Senior Member
OpenGL Guru
Re: Rotation, translation & lights
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules