How do I make a touch input controller that moves the character in the direction of the slide?
Essentially, I have a player character that moves only along the X axis. I'm trying to setup the controls in such a way that the character will move based on the direction that you swipe, but only along x. In a nutshell, I'm looking to build a control system in which you tap, hold and slide your finger around to move the character.
Any help is greatly appreciated!
asked Mar 07 '15 at 12:23 AM in Blueprint Scripting
Hey there, so like promised, I updated my answer to better illustrate how you could achieve this. But instead of using images I made a quick video tutorial instead (5-ish minutes) http://youtu.be/fogqRl5b3kw
I hope that this was helpful!
To break it down, you want to capture the initial touch, then you want to update a delta value (the amount of difference between initial touch and where the user is sliding his finger), probably every frame. So that way you know if he's sliding his finger in front or behind his initial touch. Then you apply a positive or negative movement control on the character.
I'm not going to get into the specifics, there should be enough documentation to get you there.
answered Mar 07 '15 at 01:01 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here