An interesting problem with Swiping

0 favourites
  • 3 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • I am wondering if it is possible to swipe objects to rotate in both clock-wise and anti-clockwise manner about a center? Like if I wanted to rotate the stars about the center, just move 1 place up or down depending on whether I wanted clockwise or anticlockwise motion, then would it it be possible.

    I think one would have to swipe across at least 3 stars to know in which direction the stars are supposed to move but how to actually code it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not necessarily need a sample greater than two points. A vector should be sufficient.

    If touch end x is > touch start x then angle is anticlockwise.

    If touch end x is < touch start x then angle is clockwise.

    If touch end y is > touch start y then angle is clockwise.

    If touch end y is < touch start y then angle is anticlockwise.

  • [quote:3bztz17p]"You do not necessarily need a sample greater than two points. A vector should be sufficient. "

    I was actually getting ahead of myself when I said that - I was thinking what if there were two intersecting star groups like in the image below.

    Anyways, any help is very welcome. This thing has gotten into my head and it just won't let go. Very annoying.

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