# Mouse Drag Rotation : How To Rotate Cylinder With Mouse

**URL:** <https://forums.unrealengine.com/t/mouse-drag-rotation-how-to-rotate-cylinder-with-mouse/2715641>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [April 15, 2026, 5:35pm UTC](https://forums.unrealengine.com/t/mouse-drag-rotation-how-to-rotate-cylinder-with-mouse/2715641 "2026-04-15T17:35:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fazladanhisse](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fazladanhisse](https://forums.unrealengine.com/u/fazladanhisse)\
**Post date:** [April 15, 2026, 5:35pm UTC](https://forums.unrealengine.com/t/mouse-drag-rotation-how-to-rotate-cylinder-with-mouse/2715641/1 "2026-04-15T17:35:19Z")

</div>

Hi everyone,

I’m relatively new to Unreal Engine and I’ve been struggling with a Blueprint interaction for a couple of days. I want to click and drag a cylinder (Actor Blueprint) with the mouse to rotate it, but with specific constraints:

- **Axis:** Rotation should only occur on the **Z-axis**.

- **Stepped Rotation (Snapping):** It needs to rotate in fixed **60-degree increments** (e.g., 0, 60, 120, 180, 240).

- **Clamping:** The rotation must not exceed a **maximum of 240 degrees** (starting from 0).

- **Pivot:** The pivot point is correctly centered in the middle of the object.

I have tried several approaches using _OnClicked_ and _GetMousePosition_, but I can’t seem to get the snapping and clamping logic to work together correctly without the actor glitching or rotating infinitely.

Could someone guide me on how to structure the Blueprint logic for this? Specifically, how should I calculate the mouse delta to trigger the 60-degree jumps while keeping the value within the 0-240 range?

Any screenshots or logic explanations would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Dmangames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dmangames/32/872383_2.png) [@Dmangames](https://forums.unrealengine.com/u/Dmangames)\
**Post date:** [April 15, 2026, 10:43pm UTC](https://forums.unrealengine.com/t/mouse-drag-rotation-how-to-rotate-cylinder-with-mouse/2715641/2 "2026-04-15T22:43:09Z")

</div>

I made a BP to your specifications the best I could.  
Let me know if this makes sense to you

In order to get OnClicked to trigger for the BP\_Turnable actor, you have to check Enable Click Events on your Player Controller.

![TurnTable](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/c/a8cd27e37bcaf693a63e5b711f0fedfe6c01d309.gif)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/2/802a9ffafe9de0cc8984abac61f75a5b7377e3b4.jpeg)

---

<div class="post-metadata">

**Author:** ![fazladanhisse](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fazladanhisse](https://forums.unrealengine.com/u/fazladanhisse)\
**Post date:** [April 16, 2026, 8:26am UTC](https://forums.unrealengine.com/t/mouse-drag-rotation-how-to-rotate-cylinder-with-mouse/2715641/3 "2026-04-16T08:26:14Z")

</div>

> [@Dmangames](#):
>
> In order to get OnClicked to trigger for the BP\_Turnable actor, you have to check Enable Click Events on your Player Controller.

Hey! Just wanted to say thanks a ton—it’s finally working!

I’m gonna play around with it a bit to add smooth rotation and some other tweaks. I’ll definitely drop the final setup here once it’s done.

Hope you don’t mind if I bug you again if I get stuck! 🙂
