# Spawning an object on "On Drag Cancelled"... spawns in weird locations

**URL:** <https://forums.unrealengine.com/t/spawning-an-object-on-on-drag-cancelled-spawns-in-weird-locations/253644>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [October 1, 2021, 3:03pm UTC](https://forums.unrealengine.com/t/spawning-an-object-on-on-drag-cancelled-spawns-in-weird-locations/253644 "2021-10-01T15:03:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [October 1, 2021, 3:40pm UTC](https://forums.unrealengine.com/t/spawning-an-object-on-on-drag-cancelled-spawns-in-weird-locations/253644/2 "2021-10-01T15:40:57Z")

</div>

The line trace is not set up correctly. It’s not setup at all, actually.

Can’t recall if that node can fetch mouse position at the time of drag cancel. It’s the Pointer Event that knows the position. So I’d _probably_ use that instead in this case.

How close is this to what you need:

> [@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…

---

_[View the full topic](https://forums.unrealengine.com/t/spawning-an-object-on-on-drag-cancelled-spawns-in-weird-locations/253644)._
