Dragging and dropping sword in unreal engine 4

by dave jones   Last Updated May 28, 2018 09:13 AM

I am developing a 2d game using unreal engine 4 in which the user drags and drops a sword.I want the sword to follow the position of my finger.At the moment, when I drag the sword, it moves at an offset from my finger.The game has been packaged to an pad and I have set up the functionality using blueprints.

Pseudo code:

On Drag (){ 

finger position = sword position on screen

on drop = finger position on release from screen = position of sword

}

How do I make the sword follow the position of my finger as I drag it?

enter image description here



Related Questions


UE4 - Loop through pixels for material

Updated March 29, 2017 16:13 PM

HUD Text not displaying/drawing

Updated October 27, 2017 18:13 PM

How to display Render Target live to HUD widget in UE4

Updated November 06, 2016 08:05 AM