# DragDropOperation consuming GetHitResultUnderCursor

**URL:** <https://forums.unrealengine.com/t/dragdropoperation-consuming-gethitresultundercursor/2173825>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [December 5, 2024, 2:42pm UTC](https://forums.unrealengine.com/t/dragdropoperation-consuming-gethitresultundercursor/2173825 "2024-12-05T14:42:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kiwicube](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kiwicube](https://forums.unrealengine.com/u/Kiwicube)\
**Post date:** [December 5, 2024, 2:42pm UTC](https://forums.unrealengine.com/t/dragdropoperation-consuming-gethitresultundercursor/2173825/1 "2024-12-05T14:42:11Z")

</div>

Hi,

I am trying to build an inventory drag and drop system. In my game I currently set the characters rotation using _Get Hit Under Cursor by Channel_ every Tick.

Inside my item/inventory widgets I use the _On Drag Detected_ and _Create Item Drag Drop Operation_ but lose the ability to get hits (returns False), breaking my character rotation 😕 I presume this is part of the Drag Drop Operation, is there a simple way around it?

I tried changing the game modes, changing rotation method and a custom DDO but no success. I am now trying to record screen mouse position during _On Drag Detected_, then use an event dispatcher and bring that back to the player, but then cant seem to get the Rotation value matching the numbers in the hit version. I’m still quite new to unreal so apologies if this is a silly question

Any help is appreciated!

---

<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:** [December 5, 2024, 3:05pm UTC](https://forums.unrealengine.com/t/dragdropoperation-consuming-gethitresultundercursor/2173825/2 "2024-12-05T15:05:11Z")

</div>

> [@Kiwicube](#):
>
> I presume this is part of the Drag Drop Operation,

Yes. Or to be more precise - it’s the widgets getting priority access to mouse input.

> is there a simple way around it?

Check this out, see if that helps:

> [@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:** ![Kiwicube](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kiwicube](https://forums.unrealengine.com/u/Kiwicube)\
**Post date:** [December 5, 2024, 4:34pm UTC](https://forums.unrealengine.com/t/dragdropoperation-consuming-gethitresultundercursor/2173825/3 "2024-12-05T16:34:49Z")

</div>

Massive thanks for sending this through, helped me understand World Location and World Direction a lot better and how to correctly setup Line Trace By Channel. Here is the solution that seems to work!

 ![Capture](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/9/7/59797fb6900022f3d20daba3068ef4ed2e11a26b.png)

I have this inside my PlayerCharacter and works well enough, the Line Trace By Channel is a bit weird in the Y direction when you do small movements up and down near the player? I have future ideas/mechanics that may address this so haven’t looked into that yet.

Hopefully will help others too

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [January 4, 2025, 4:35pm UTC](https://forums.unrealengine.com/t/dragdropoperation-consuming-gethitresultundercursor/2173825/4 "2025-01-04T16:35:42Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
