PDA

View Full Version : Very silly problem with lighting



Alessandro_dup1
12-03-2004, 10:20 AM
I have the following problem, i know it must be smt to be ashamed to ask, but i got so upset that i only have confusion in my head.
Suppose i have a light at 0,10,-10, and an object at 0,0,0. When i rotate the scene, i'd like to rotate the light too, so that the object illumination remains the same. I don't know how to do it, could you pls help ?

roffe
12-03-2004, 10:34 AM
Treat the light as any other object, position it with its local coordinates. It will transform with your viewing transforms.

zukko
12-03-2004, 03:35 PM
use the rotate function before fdrawing the ligth and the object