Hey everyone,
I’ve just recently started with Unreal Blueprints and I’ve run into an issue that I can’t really solve.
I’m working on a combination lock with 3 digits atm.
The Actor has 4 static meshes inside of it, 3 of which are the wheels.
The wheels currently only display numbers from 1-5, so the wheels need to be turned by 72 degrees.
I’ve hooked it up so that they react to a line trace which works great.
I also use always two values to animate a lerp node, a current rotation and a target rotation.
Now the issue is that when I turn a wheel twice (from 0 to 72 and from 72 to 144 degrees) it works fine, but if I try to turn it past 180 degrees everything falls apart.
After looking it up I saw that Unreal doesn’t like rotational values above or below 180.
So my current and target rotations should be 144 and 216 when I try to turn it for the third time, but for whatever reason it shows me that on the third turn, it tries to rotate from 36 to 108.
Aka instead of adding 72, it substracts 36
I tried a couple different approaches from the forum/reddit and chatgpt but I’m always running into the same issue.
Greatly appreciate any help!

