Add Actor Local Rotation Bug

Add Actor Local Rotation stops when it reaches 90 (goes from -270 to +90), in theory it should flip to -270 at 90 so it can continue to add, but as of 4.5 (not tested earlier versions) it does not, it just stops adding! Set Actor Rotation still works with higher values.

I believe this is the reason a lot of people have trouble with Day/Night cycle when the sun seems to get stuck at noon!

1 Like

I had the same problem with roll.

Hey Electronik-

When you use the Add Actor Local Rotation node, are you changing the roll, pitch, or yaw? I added the node and used a key press to check the values as it rotated 360 degrees in 10 degree increments, switching from positive to negative at 180 to continue continue rotating back to 0 in case of both roll and yaw. The pitch went from 0 up to 90 and back to 0, then continue to -90 before increasing back to 0.

Cheers

I was only changing the Pitch (standard Sun rotation). I set it to print string each tick. As you would expect there were tiny increments in the angle as it looped, but as it hit -90 or below it stops at -90.0 (I had reversed direct at this point, but still stops at -90 in the same vein). I even tried to manually flip it, but that means using Set Actor Rotation, which defats the object (might as well just use that instead from the get-go) which is what I did.

Simple test, just follow the WIKI Day Night example (that uses Actor Local Rotation) as it will stop at midday - print string shows it to stop at -90.0. I may have got the number the wrong way around in the Op (270 to -90) btw. :o

I am still unable to reproduce the pitch locking at -90 during a day/night cycle with the setup shown in the wiki tutorial. Could you post an image of your blueprint and how you have the tick function and Add Actor Local Rotation function set up?

Hey Electronik Eel-

Using a timeline and a Lerp node you should be able to use the objects current position to get the starting rotation and add the desired rotation. After the rotation finishes you just need to save the new position’s rotation if it is to continue rotating. Here’s an image of how to set it up in blueprints:

Cheers

set the DirectionalLight rotation.X not 0

I was worth a lot, Thank you

I am also having this problem using Add Actor Local rotation, did you ever figure it out? If so, please share, it is driving me wild!