# Dragging 3D object 'out of' a UI button but position not updating when holding

**URL:** <https://forums.unrealengine.com/t/dragging-3d-object-out-of-a-ui-button-but-position-not-updating-when-holding/232066>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [May 28, 2021, 9:40pm UTC](https://forums.unrealengine.com/t/dragging-3d-object-out-of-a-ui-button-but-position-not-updating-when-holding/232066 "2021-05-28T21:40:04Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 30, 2021, 7:06am UTC](https://forums.unrealengine.com/t/dragging-3d-object-out-of-a-ui-button-but-position-not-updating-when-holding/232066/6 "2021-05-30T07:06:10Z")

</div>

> so many different links of events… […]if there’s a way to approach this in a simpler fashion

Let me clarify; what I originally suggested is suitable for a situation where you want _both_ - dragging a widget and dragging an actor around _simultaneously_.

Spawning and dragging after an interface click is easier as we don’t care about widget position:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/b/0b674149990295d11e22886b1cd1cd6d1035f142.jpeg)

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/5/6857e0e442012397a9369de9fedddf4944c4d2ff.gif)](https://gyazo.com/845ee0e5a16140ad15da7f127fe34cf8)

The above _should_ be in the Player Controller. Here the button was set to Mouse Down so it releases focus even though its Up never happens and the controller can take over:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/3/3/337d6f93ae73eac6a38896b8ce7d63caa113c551.png)

* * *

> So,. the whole reason we needed a separate Drag Operation Blueprint is to get the ‘dragging position’ from them? Because we can’t get the current position from mouse because of the UI / Player Controller ‘fighting’ issue?

It’s somewhat convoluted how input _bubbles_ between widgets but yeah, pretty much. Most of the time, we’re in this mode:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/c/5/c5aec5b6f12fcfd6a0e82387b4dcf01a79dbaa18.png)

Interact with a widget and choose what happens with the input next (here, a click):

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/2/7207dac304aac1f22ed95732ffea4fd718b338a0.png)

Pass _Handled_ to consume input & terminate. Pass _Unhandled_ so another widget may process it (if they’re underneath, for example). If no other widget Handles it, the Player Controller will get it. So yes, you can click through widgets and get both the PC and the UI to manage the very same input.

However, the problem with dragging is that it does not let you return such reply.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/2/02429d469002f4da29c292719c345dc2cea81593.png)

Technically, you could fill the entire screen with another transparent widget, override _onMouseMove_ and reply with Unhandled but that’s even a bigger hack than the original solution.

And it would make working with other UI elements awkward.

---

_[View the full topic](https://forums.unrealengine.com/t/dragging-3d-object-out-of-a-ui-button-but-position-not-updating-when-holding/232066)._
