Hi, I’m wondering if there’s anyway to get the Sun’s Position in-game in correspondance to the WorldPosition - I’m looking at having an item that’ll shoot into the Direction of the Sun before having an effect.
I know there’s SunDirection, but is there any way to get Sun WorldPosition?
Below is a simple example of what I mean - Snipped from Skyrim: Dawnguard.
Pretty sure it would be hard to get the sun’s position using GeographicLatitude and ClockTime or TimeOfDay, try using an anchored rotating part (positioned either on the player or 0,0,0) connected to one in the sky, then sync it up with the sun in the sky.
I think you’ve tried this already, but have you tried using Lighting:GetSunDirection()? It returns the direction the sun is facing from the origin (0, 0, 0)
The sun has no actual position, since it’s locked to the skybox. So the direction of the sun is the most valuable information. The sun technically exists at infinity on that directional vector.
If you’re trying to get a part to block the sun, it gets a bit tricky. You can’t throw a part at infinity, because you would never see it. So you’d have to get a bit fancy with your code to figure this out. I don’t know how to do this at the top of my head, but maybe someone else has a solution for it.