# How to set on drop?

**URL:** <https://forums.unrealengine.com/t/how-to-set-on-drop/621969>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, Widget, UE4, Blueprint, question\
**Created:** [August 5, 2022, 10:50am UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969 "2022-08-05T10:50:54Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![RDJ3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RDJ3000](https://forums.unrealengine.com/u/RDJ3000)\
**Post date:** [August 5, 2022, 10:50am UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969/1 "2022-08-05T10:50:54Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/f/8/bf888533542b04abf8859c352af3ab2c562a80ed.jpeg)

I am dropping this waypoint, on the center but it drops on different coords, like on the screenshot  
How to set it up, so it can track my mouse and drop it on right spot  
Sorry for my English))

---

<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:** [August 5, 2022, 10:56am UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969/2 "2022-08-05T10:56:15Z")

</div>

You’d need to show the script - how are you generating the new coord?

---

<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:** [August 5, 2022, 11:04am UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969/5 "2022-08-05T11:04:57Z")

</div>

You’ll need to explain how this is supposed to work. Assume we know nothing about what you’re doing. I see we’re mixing 3d and 2d here since the waypoint is an actor and then it’s also represented with an icon.

As much detail as you can, please. Currently I have no idea what is even supposed to happen when you drop that widget.

> I am dropping this waypoint, on the center but it drops on different coords, like on the screenshot

What is in the wrong coord? The 2d widget or the actor you spawn? Both?

---

<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:** [August 5, 2022, 11:07am UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969/6 "2022-08-05T11:07:06Z")

</div>

How close is this to what you’re trying to achieve:

> [@How can I manipulate world location through a minimap widget?](https://forums.unrealengine.com/t/how-can-i-manipulate-world-location-through-a-minimap-widget/469190/2):
>
> You can detect clicking on the world map by putting a clear widget button on top of it, and then detecting the cursor location on click. (remember to zero out the alpha on all the button images Normal, Highlight, Pressed, etc.) Then to drag you’ll need to use the Drag and Drop system built-in to Unreal. It has parameters to clip your object within the bounds of the map, drag the object around responsively, and then detect when it is dropped. There is a problem you’ll need to work around to have …

---

<div class="post-metadata">

**Author:** ![RDJ3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RDJ3000](https://forums.unrealengine.com/u/RDJ3000)\
**Post date:** [August 5, 2022, 11:08am UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969/7 "2022-08-05T11:08:56Z")

</div>

So, this waypoint has to drop where my mouse is currently on but it drops on the wrong spot. I want to drag it and drop wherever i want and its supposed to spawn actor on the world

---

<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:** [August 5, 2022, 11:09am UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969/8 "2022-08-05T11:09:48Z")

</div>

Again, what is dropping in the wrong spot. The 2d widget or the 3d actor? You’re calling it _a waypoint_ but it seems to have 2 elements here.

---

<div class="post-metadata">

**Author:** ![RDJ3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RDJ3000](https://forums.unrealengine.com/u/RDJ3000)\
**Post date:** [August 5, 2022, 11:10am UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969/9 "2022-08-05T11:10:51Z")

</div>

3d actor is dropping on the wrong spot. it needs to drop when i drag this widget with “heart” and let go. And it needs to drop exactly where i let it go. Sorry for my English)

---

<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:** [August 5, 2022, 11:17am UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969/10 "2022-08-05T11:17:48Z")

</div>

Cool. So this bit…

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/a/5/7a50cd99cce64cc5282a9beed079c8fc40412a2c.png)

…will not work. We need to translate the 2d coords into 3d. Either have a look at the link I posted above which translates the widget size into another world size or deproject:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/8/438da9c1eef1436d090a289135d25a4f83079543.png)

Alternative way to deproject:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/d/97d638df9f72151aafb1b5eaf9145644a0b52106.png)

I have to assume _a lot_ here - no clue how the world we’re dealing with looks like - suggesting generic ideas only.

Do note that the way player controller works while a widget has focus is convoluted. Have a look here for more info:

> [@Getting Mouse Position During Drag and Drop UMG](https://forums.unrealengine.com/t/getting-mouse-position-during-drag-and-drop-umg/85760/15):
>
> Because it's undocumented, arcane knowledge obtainable only by those knowing a secret handshake. The below assumes you have overridden and using a Game Mode, a Player Controller and created a custom Drag & Drop Operation. in the Player Controller A Custom Event converts screen space to world space via deprojection and sets actor’s position: in the Custom Drag & Drop Operation blueprint Event Dragged spits out screen space coordinates and feeds them to an Event Dispatcher, we…

---

<div class="post-metadata">

**Author:** ![RDJ3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RDJ3000](https://forums.unrealengine.com/u/RDJ3000)\
**Post date:** [August 5, 2022, 11:23am UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969/11 "2022-08-05T11:23:19Z")

</div>

Man you’re genius, i will try to implement it. If it works i’ll let you know

---

<div class="post-metadata">

**Author:** ![RDJ3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RDJ3000](https://forums.unrealengine.com/u/RDJ3000)\
**Post date:** [August 5, 2022, 11:57am UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969/12 "2022-08-05T11:57:05Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/c/e7cab4f7be08d25d63b06aae879dd9c15fa2b489.png)  
I implemented on mouse move, and that error pop out. How i fix that

---

<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:** [August 5, 2022, 12:16pm UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969/13 "2022-08-05T12:16:17Z")

</div>

The error tells you. You forgot the transform - the actual location

---

<div class="post-metadata">

**Author:** ![RDJ3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RDJ3000](https://forums.unrealengine.com/u/RDJ3000)\
**Post date:** [August 8, 2022, 4:19am UTC](https://forums.unrealengine.com/t/how-to-set-on-drop/621969/15 "2022-08-08T04:19:19Z")

</div>

(post deleted by author)
