# Drag and Drop In Game

**URL:** <https://forums.unrealengine.com/t/drag-and-drop-in-game/303178>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [January 6, 2015, 1:26pm UTC](https://forums.unrealengine.com/t/drag-and-drop-in-game/303178 "2015-01-06T13:26:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_d6e3465a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d6e3465a](https://forums.unrealengine.com/u/anonymous_user_d6e3465a)\
**Post date:** [January 6, 2015, 1:26pm UTC](https://forums.unrealengine.com/t/drag-and-drop-in-game/303178/1 "2015-01-06T13:26:07Z")

</div>

Hi All,  
I need a help, a tip or something that could lead me to a solution.

I´m developing a game that I need to drag objects with mouse and put them in some positions inside the map.  
I am facing a issue on imagining a way to do this. How can I drag the objects inside the maps (actors like cubes and others geometrics) with mouse?

Please, help me! Any tip is very wellcome.

Thank you so much!!!

---

<div class="post-metadata">

**Author:** ![Erasio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Erasio](https://forums.unrealengine.com/u/Erasio)\
**Post date:** [January 6, 2015, 1:37pm UTC](https://forums.unrealengine.com/t/drag-and-drop-in-game/303178/2 "2015-01-06T13:37:31Z")

</div>

There is a node called “Get hit result under mouse” in your Controller BP. You can use this to check after a click if the object you clicked on is one you can move and then save it in a variable.

You can then on each tick get that location the same way and move the object you picked up there (probably putting the object a bit above the ground with a little bit of vector modification) and then when you want to put it down again just empty your variable and place the actor on the actual location.

Remember for the event tick move to check with a branch if your variable contains anything (via “IsValid”).

I hope this helps.

Cheers

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d6e3465a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d6e3465a](https://forums.unrealengine.com/u/anonymous_user_d6e3465a)\
**Post date:** [January 6, 2015, 1:51pm UTC](https://forums.unrealengine.com/t/drag-and-drop-in-game/303178/3 "2015-01-06T13:51:42Z")

</div>

Thank you so much, Erasio.  
Very Useful!!!  
With your tip I could find this link:

> **[Content Examples](https://docs.unrealengine.com/5.2/en-US/content-examples-sample-project-for-unreal-engine/)**
>
> This sample project demonstrates specific concepts and techniques to use in Unreal Engine.

This is exactly what I need!!  
Regards!!!

---

<div class="post-metadata">

**Author:** ![ederoliveira20](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ederoliveira20](https://forums.unrealengine.com/u/ederoliveira20)\
**Post date:** [June 8, 2015, 7:13am UTC](https://forums.unrealengine.com/t/drag-and-drop-in-game/303178/4 "2015-06-08T07:13:05Z")

</div>

Man, with this I could advance a lot on my project, thank you so fu\*\*in much.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9b90f92b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9b90f92b](https://forums.unrealengine.com/u/anonymous_user_9b90f92b)\
**Post date:** [October 20, 2018, 12:45pm UTC](https://forums.unrealengine.com/t/drag-and-drop-in-game/303178/5 "2018-10-20T12:45:55Z")

</div>

Excellent findings! Thank you
