Sun rises and sets on the wrong sides

In my game I use slightly different coordinates for moving forward/right/etc. For example, “forward” means -Y and “right” means +X. The cities and similar content also fits this. But how to fit the sun? Otherwise it happens that sun rises at the south, then goes to the west and sets at the north. How to fix this? Turning BP_SunPosition, DirectionalLight, SkyLight or even the entire SkySphere does not seem to work (but not sure, I didn’t check deeply). What needs to be turned?

You are probably lerping or adding rotation in world space for your directional light, this would invalidate any rotating of the bp.

You could try changing world rotation to relative rotation (if it’s in an actor) but without seeing any code it’s impossible to know how to fix this.

I do not have any user-defined code of the sun, just updating it every several seconds. I use the built-in plugin “Sun Position Calculator”, do I need to modify its “body”?

You can change where north is with “North Offset” in the BP_SunPosition details panel. Also make sure you have the latitude and longtitude set correctly.

1 Like

Thanks for the early reply, it works! Good luck!