# Rotating 3d actor overlay inside widget with drag operation?

**URL:** <https://forums.unrealengine.com/t/rotating-3d-actor-overlay-inside-widget-with-drag-operation/529366>\
**Category:** UI\
**Tags:** unreal-engine, Widget, UE4-27, question, UMG\
**Created:** [April 15, 2022, 10:59am UTC](https://forums.unrealengine.com/t/rotating-3d-actor-overlay-inside-widget-with-drag-operation/529366 "2022-04-15T10:59:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![KaidoomDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kaidoomdev/32/977996_2.png) [@KaidoomDev](https://forums.unrealengine.com/u/KaidoomDev)\
**Post date:** [April 15, 2022, 11:10am UTC](https://forums.unrealengine.com/t/rotating-3d-actor-overlay-inside-widget-with-drag-operation/529366/2 "2022-04-15T11:10:04Z")

</div>

You need to use mouse move to achieve better results:

- On mouse down you save current mouse position, set some bool so mouse move function can calculate the change in drag,
- Mouse move you Get current mouse position and subtract it from old mouse position
- Mouse up you stop mouse move

Here’s a working example I have, in the last image you see I’m using add local rotation to a spring arm so replace the spring arm with a mesh or whatever you want to rotate.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/a/afaa6b5ca816684e8bfe1a01e667c5bd81bbc779.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/6/c/f6c8eeaa9ccc094ce9984aeb56fd30dea81a8760.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/2/6b27496f09b7f47e5d0b20920f9209eca5c637ea.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/c/e/ccee3a704170d6f4c7070ef23c1701e833d5e930.png)

---

_[View the full topic](https://forums.unrealengine.com/t/rotating-3d-actor-overlay-inside-widget-with-drag-operation/529366)._
