kevinfishburne
08-29-2012, 10:01 PM
I have some code:
' Update solar light source direction.
SolarPosition[0] = Unknown
SolarPosition[1] = 0
SolarPosition[2] = 1
SolarPosition[3] = 0
Gl.Lightfv(Gl.LIGHT0, Gl.POSITION, SolarPosition)
I realize that a directional light uses a vector to determine its direction but can't figure out what values should be used to make it spin continuously about one axis, simulating the sun. I can get it to bounce between what appears to be a 180 degree arc, but I can't get it to a full cycle. Experimental values produce illogical results. What am I missing here?
' Update solar light source direction.
SolarPosition[0] = Unknown
SolarPosition[1] = 0
SolarPosition[2] = 1
SolarPosition[3] = 0
Gl.Lightfv(Gl.LIGHT0, Gl.POSITION, SolarPosition)
I realize that a directional light uses a vector to determine its direction but can't figure out what values should be used to make it spin continuously about one axis, simulating the sun. I can get it to bounce between what appears to be a 180 degree arc, but I can't get it to a full cycle. Experimental values produce illogical results. What am I missing here?