1
\$\begingroup\$

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

\$\endgroup\$
2
  • \$\begingroup\$ Have you seen documention? Creating Drag and Drop UI \$\endgroup\$ May 28 '18 at 8:51
  • \$\begingroup\$ I have seen the documentation yes. However I am still struggling to find the solution for a touch screen device. \$\endgroup\$
    – dave jones
    May 28 '18 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.