Announcement

Collapse
No announcement yet.

How can I apply the swipes and on screen touch?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How can I apply the swipes and on screen touch?

    Sorry for this basic question, but I'm new with the Unreal Engine and I don't know how can I split the screen on 2 to make a different action(left and right) depending on which side of the screen do you press and also how to make the swipe function work(and the reverse swipe too). I've been trying but I finally gave up searching and experimenting. I hadn't find anything on google. Is documentation or a tutorial of something like this anywhere?

    Thanks!

    #2
    For seeing if the right or left side is toeuched you simply can do something like "if the touchpositions x value is smaller then the screens width divided by 2 then its left, otherwise its on the right side".
    For swiping you could take 2 positions of your finger. Previous frame and current frame. Then you calculate a vector between these 2 and based of that vector you then can see in what direction the swipe went and make stuff happen based on that.

    Hope that helped you getting a grasp of how it works.

    Comment


      #3
      I created a "tutorial"to detect touch on mobile

      see here: https://forums.unrealengine.com/show...ouble+tap+free
      The Hangar Studio - Video Game Studio

      An I for an I
      (Imagination equals Innovation)

      Comment

      Working...
      X