Advertisement

Dragging sword

Started by May 28, 2018 07:51 AM
0 comments, last by davejones 6 years, 3 months ago

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 ipad 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? 

ondropgetmouseposition.PNG

This topic is closed to new replies.

Advertisement