Does any one know how Compare touch speed works?

0 favourites
  • 9 posts
From the Asset Store
Have you ever dreamed of playing in a Speedball game or tournament?
  • so the tool tip for Compare touch speed says it can be used to detect a swipe? i looked on the manual but am still confused how i can use this to detect a swipe? does any one have an valid example or uses for this condition?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If its greater than 0, then its moving.

  • so the tool tip for Compare touch speed says it can be used to detect a swipe? i looked on the manual but am still confused how i can use this to detect a swipe? does any one have an valid example or uses for this condition?

    Hey mate,

    I have an infinity jump project where I'm using it.

    Here is how I'm doing:

    I am using it just for Y vector, it detects a swipe, and have 3 options based on how "big" was this swipe.

  • wait your not using the compare touch speed condition in your snippet?

  • klabundee in his example doesn't compare time or speed, which means if you move your finger really slowly across the screen, it will still be recognized as a swipe.

    I would do something like this:

    On any touch end

    Touch.speed>200

    ....Touch.Angle between 60 and 120 -> Move character down

    ....Touch.Angle between 150 and 210 -> Move character left

    ....Touch.Angle between 240 and 300 -> Move character up

    ....Touch.Angle between 330 and 30 -> Move character right

    For more strict swipe recognition you might want to check if the time between touch start and touch end is less than, say 1 second.

  • okay sweet, thanks

  • klabundee in his example doesn't compare time or speed, which means if you move your finger really slowly across the screen, it will still be recognized as a swipe.

    I would do something like this:

    On any touch end

    Touch.speed>200

    ....Touch.Angle between 60 and 120 -> Move character down

    ....Touch.Angle between 150 and 210 -> Move character left

    ....Touch.Angle between 240 and 300 -> Move character up

    ....Touch.Angle between 330 and 30 -> Move character right

    For more strict swipe recognition you might want to check if the time between touch start and touch end is less than, say 1 second.

    I will consider touch.speed but the time between touch start and end for my project works different.

    Is a plus if you swipe and just wait for the right moment to release your finger and jump.

  • klabundee

    sidetrack I know but ooo nice looking game

  • klabundee

    sidetrack I know but ooo nice looking game

    Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)