Skip to main content
gamedev.net
🔒 Locked

Problem with light

Started by Lord Maz 3 replies 350+ views
Original Post
Lord Maz
Lord Maz
I''ve got a problem with the lightsetting in my simple project. I''ve set up a lightpoint. It should be, for example, initially positioned behind the camera. The problem is, when I move around in the scene with my camera class that uses gluLookAt, the light moves with the camera, resulting in that I allways see the model lit in the front. What I need is to be able to place the lightspot in an absolute spot, not one relative to the camera. Greatful for any help! -Lord Maz-
-Lord Maz-
LockePick
LockePick
Re-position the light every frame after moving the camera.

------------
MSN: nmaster42@hotmail.com, AIM: LockePick42, ICQ: 74128155
"It''s all part of the conspiracy of conspirators conspiring to conspire their own conspiracies..."
Tigra7
Tigra7
Just use a different matrix for the light... you may want to read up on matrixes if you do not understand them.
Lord Maz
Lord Maz
Hmm yeah, that worked. Seemed a bit counter-intuitive to have to give commands for stuff to stay right where it is..

Isn''t there a way to lock the light relative to the world coordinates instead of the camera''s?

-Lord Maz-
-Lord Maz-

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.