How do I get the 3d position of the sun in the game?
✓ ANSWER ACCEPTED
How do I get the position of the sun?
1 answer
✓ Accepted answer
I'm not quite sure if this is what you're looking for, but there is a way to get the LookVector of the sun. You'd use the function GetSunDirection ( ) and it will return a Vector3 Value
Note This is a function property of Lighting.
Here is a simple script:
local l = game.Lighting ---Lighting
local dir = l:GetSunDirection()
print(dir)
If you have TimeOfDay set to exactly 12, in will return the coordinates; -8.30329014e-008, 0.94978565, 0.312901378.
I hope this helped!
This discussion is preserved as it was. New answers, comments, and votes are closed.
