How to implement swipe controls like Crossy Road (SOLVED)

I’m planning to create a mobile game (for learning sake) like Frogger or Freeway (Chicken game like Frogger).

I don’t feel like to put a virtual joystick on screen. As far I remember, I can use something like Crossy Road has - swipe controls (swipe up, down, left, and right).

Do we have any samples for this?

Thanks,
José

3 Likes

I have a bunch of input related scripts and modules here: GitHub - britzl/defold-input: Simplify input related operations such as gesture detection, input mapping and clicking/dragging game objects

The Gesture script/module will help you detect swipe, pinch etc: defold-input/in/gesture.md at master · britzl/defold-input · GitHub

6 Likes

Thank you @britzl! That’s what I was looking for :slight_smile:

2 Likes