# Rotating the wheels of a combination lock 

**URL:** <https://forums.unrealengine.com/t/rotating-the-wheels-of-a-combination-lock/2731752>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [June 26, 2026, 7:16pm UTC](https://forums.unrealengine.com/t/rotating-the-wheels-of-a-combination-lock/2731752 "2026-06-26T19:16:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lumberjack871](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lumberjack871](https://forums.unrealengine.com/u/Lumberjack871)\
**Post date:** [June 26, 2026, 7:16pm UTC](https://forums.unrealengine.com/t/rotating-the-wheels-of-a-combination-lock/2731752/1 "2026-06-26T19:16:53Z")

</div>

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

 ![nodes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/b/adb5f2fadfb060832df4b015b48c15077ea2b214.png)

 ![lock_model](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/c/03cd400a30e4221a717bbcbe96c806341ee0aaed.jpeg)

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!

---

<div class="post-metadata">

**Author:** ![Dejan33](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dejan33/32/1194514_2.png) [@Dejan33](https://forums.unrealengine.com/u/Dejan33)\
**Post date:** [June 26, 2026, 7:43pm UTC](https://forums.unrealengine.com/t/rotating-the-wheels-of-a-combination-lock/2731752/2 "2026-06-26T19:43:07Z")

</div>

Instead of rotating y(pitch), try rotating on z(yaw). If that works, then change pivot rotation on the digits meshes. There is a tool somewhere in editor to change pivot position and rotation on a mesh.

---

<div class="post-metadata">

**Author:** ![Lumberjack871](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lumberjack871](https://forums.unrealengine.com/u/Lumberjack871)\
**Post date:** [June 26, 2026, 7:52pm UTC](https://forums.unrealengine.com/t/rotating-the-wheels-of-a-combination-lock/2731752/3 "2026-06-26T19:52:53Z")

</div>

omg that actually solved it, you saved my sanity!  
can you by chance tell me what the problem is with the pitch?  
like, it shouldn’t be a gimbal lock when only one axis is rotated no?

---

<div class="post-metadata">

**Author:** ![Dejan33](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dejan33/32/1194514_2.png) [@Dejan33](https://forums.unrealengine.com/u/Dejan33)\
**Post date:** [June 26, 2026, 7:55pm UTC](https://forums.unrealengine.com/t/rotating-the-wheels-of-a-combination-lock/2731752/4 "2026-06-26T19:55:46Z")

</div>

No idea.

---

<div class="post-metadata">

**Author:** ![Lumberjack871](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lumberjack871](https://forums.unrealengine.com/u/Lumberjack871)\
**Post date:** [June 26, 2026, 8:03pm UTC](https://forums.unrealengine.com/t/rotating-the-wheels-of-a-combination-lock/2731752/5 "2026-06-26T20:03:46Z")

</div>

ha fair enough, thanks again! 😃
