Advertisement

How do I translate a light along with a scene?

Started by April 16, 2003 01:25 PM
1 comment, last by stevesherrin 21 years, 10 months ago
I am progamming a simple scene as a variation of Lesson 10. Unfortunately the diffuse light remains in position in relation to the "camera". Unfortunately this means it is not constant in relation to the geometry of the scene. How can I make it follow the scene''s translations/rotations rather than the camera''s? (ie- the light stays in the back right corner of a room, regardless of where your point of view is or where it is facing) I appreciate any help
Steve Sherrin
call glLightfv(lightnum, GL_POSITION, position); after you do the rotations for the world.
Advertisement
Thank you very much. Looks like I always overlook the simple solutions
Steve Sherrin

This topic is closed to new replies.

Advertisement