How do I make gesture rotation on mobile

0 favourites
  • 2 posts
From the Asset Store
Multistroke Gesture Recognizer and Recorder for Construct 3
  • Hello,

    I'm currently developing a tangram game and I'm trying to make rotation on each puzzle piece with gesture detection on screen (touch / mobile).

    At this stage, I see 2 different possibilities to do it :

    1. one active piece is selected and the rotation of the piece depends on the rotation gesture speed around the piece

    2. piece is selected with one finger and the second finger make a rotation around the piece for the rotation degree.

    I had a look on this 2 plugins :

    but I don't think it can help a lot...

    Any ideas on how I can do this ?

    Many thanks for your help,

    Rosedestemps

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi guys,

    these is where I'm with my issue.

    I've used the angle(x1, y1, x2, y2) / atan function to generate the rotation angle depending on x,y coordinates of the touch action around the piece.

    Unfortunately, controls are still impossible to use on mobile, it jumps from one angle to another without distinctions.

    I've attached my current test...

    Any ideas of the kind of math function I can use ?

    I guess there is probably a solution with cosinus using 3 points : x,y and image point - but I don't know how to build it...

    Many thanks for you through !

    Rosedestemps

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