Just checked “World Rotation Speed”… and it is not working correctly in current version
When I was changing blueprint for on replication I have moved code related to World Rotation Speed and forgotten to connect DeltaTime after that. The fix should be available soon as version 4.2.
What do you mean by ‘sync up correctly’ in the realistic model of sun/moon on earth these two astronomical bodies are not synced together. The Moon makes a complete orbit around Earth with respect to the fixed stars about once every 27.3 days and realist movement of this Moon is really complicated. I’ve tried to implement realistic model but it didn’t work very well for games so decided to implement the simplified model.
Show me some screenshot or video it will be easier to understand and fix this.
Remember that the Moon is not appearing from anywhere, when the atmosphere is dark you can see the light from the sun reflected by The Moon - it’s closest to a realistic model I could get.
Probably you can’t see the Moon because you set it by MoonChangeSpeed and Moon moved to the opposite side of earth near the sun and it is invisible.
I see the problem now.
In version 4.2 i’ve added small change for you. After the update setup your blueprint like this:
- Set Time of the day at midnight (0:00)
- Set up where the Moon should be positioned at midnight
- Set rotation speed MoonRotationSpeed
MoonRotationSpeed.x - can be anything because it is the horizontal movement, the moon will never disappear.
MoonRotationSpeed.y - degrees per day, if you want full cycle day/night then setup 360’ degrees.
MoonRotationSpeed.z - degrees per day, if you want full cycle day/night then setup 360’ degrees. - Set Time of Day back as you need.
In version 4.2 you will be able to force visible moon always on the sky by using MoonOverHorizon= true but for me, it is a temporary solution.
You can use delegates or implement an interface that will change whatever you want.
You can use SetWeatherPresetByIndex or SetWeatherPresetExternal to change the preset - if you don’t need to change time duration then set transition time parameter to -1 (in version 4.2).
I believe the new version of Fast Stylized Procedural Sky will fix problems related to moon direction. I’ve sent you link to the new version in PM, please check if everything works like you wish.
Instead of moving Actor every frame just use AttachToActor with disabled relative rotation.