I have a dilemma and need more math assistance than scripting; I can’t help but feel the answer is obvious, and I’m drawing a blank.
I have a game object that keeps track of the in-game time and displays it. The time can be sped up or slowed down, and right now, it’s set to a 12 hour cycle with a flag for AM/PM.
Meanwhile, I also have a game object similar to a sun which rotates on the x-axis in relation to the passing time.
I’m having difficulties ensuring that the sun game object is pointing in the same direction every time it is a given time. For instance, at 12pm I want the rotation to be 90 degrees - everytime it is 12pm, regardless of how the time was sped up or slowed down in the interim.
Any help to lead me towards the right formula to accomplish this would be greatly appreciated.