logo hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Touch and Swipe Behavior

    Scheduled Pinned Locked Moved
    Help and Support
    2
    10
    324
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ZuniSoftZ
      ZuniSoft
      last edited by

      I have a started touching behavior that makes my player jump, all is good. I added a swiping behavior to make the player attack. The start touching behavior always fires first… so when I swipe the jump logic fires before the attack logic. Cannot figure out how to differentiate between touches and swipes. Any pointers would be appreciated!

      ZuniSoftZ 1 Reply Last reply Reply Quote 0
      • ZuniSoftZ
        ZuniSoft @ZuniSoft
        last edited by

        I think I figured out, used a wait behavior after the touch and checking a couple of player action state variables.

        ZuniSoftZ 1 Reply Last reply Reply Quote 0
        • ZuniSoftZ
          ZuniSoft @ZuniSoft
          last edited by

          Not a solution, with a wait it still randomly triggers the touch before the swipe. HELP! This has to be easy…

          1 Reply Last reply Reply Quote 0
          • MurtazaM
            Murtaza Admin
            last edited by

            In general using swipe and touch will conflict because the initial gesture is the same.

            Try using stopped touched instead. Usually you want to initiate an action when you let go of a button any ways.

            ZuniSoftZ 2 Replies Last reply Reply Quote 0
            • ZuniSoftZ
              ZuniSoft @Murtaza
              last edited by

              @Murtaza I will try that; however, from my days as an in-house tester at Nintendo, button down or touch begin initiates an action. With application interfaces button up or touch end seems to be the case… ah the nuances of UI/UX .

              1 Reply Last reply Reply Quote 0
              • ZuniSoftZ
                ZuniSoft @Murtaza
                last edited by

                @Murtaza Didn’t work… The end of a swipe triggers stopped touching.

                MurtazaM 1 Reply Last reply Reply Quote 0
                • MurtazaM
                  Murtaza Admin @ZuniSoft
                  last edited by

                  @krdavis
                  You could try disabling the behaviour, then when you're done touching enable it.

                  ZuniSoftZ 1 Reply Last reply Reply Quote 0
                  • ZuniSoftZ
                    ZuniSoft @Murtaza
                    last edited by

                    @Murtaza still wonking behavior, thx… I’ll keep messing with it.

                    ZuniSoftZ 1 Reply Last reply Reply Quote 0
                    • ZuniSoftZ
                      ZuniSoft @ZuniSoft
                      last edited by

                      @Murtaza short swipes were the problem, they were acting like a touch. The player needs to make a decent swipe and then all works as expected. I also used stopping touch to initiate a jump, A tap and the player jumps and a long swipe, player attacks. Thanks for pointing me in the right direction.

                      MurtazaM 1 Reply Last reply Reply Quote 2
                      • MurtazaM
                        Murtaza Admin @ZuniSoft
                        last edited by

                        @krdavis
                        Glad you figured it out!

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post