recognize full rotation with the finger

POMPOM Member Posts: 2,599
edited November -1 in Working with GS (Mac)
hey guys, im having a simple problem, for some reason i cant figure it out.....
i want to recognize a full spin of an actor (with the finger)

so when touch is pressed :
it "rotate to position" touch X and Y
and changing self.initialROT (angle) to self.rotation

now we start spin it, how can i tell when it reaches full spin?
any suggestions?

Comments

  • ORBZORBZ Member Posts: 1,304
    tricky problem actually...

    can the rotation be interrupted halfway through the spin and reversed? What if the user picks up their finger, does the rotation reset?
  • POMPOM Member Posts: 2,599
    ORBZ said:
    tricky problem actually...

    can the rotation be interrupted halfway through the spin and reversed? What if the user picks up their finger, does the rotation reset?

    exactly my point!
    how can i recognize a full spin?! it is tricky, didnt figure it out yet
  • POMPOM Member Posts: 2,599
    ok guys i just wanted to share with you my solution for this, just in case you'll need it

    4 actors 100H X 20W (first press, second press, third press, forth press)
    5 booleans - false (first , second, third, forth, FAILED)

    i placed the 4 actors like a clock:
    . |
    -- --
    . |
    so for actor 1 (at 12o'clock) when touch is inside change attribute "first" to true"
    and for actor 2 (at 3 o'clock) when touch is inside AND when attribute "first" = true
    change attribute "second" to true , and so on..

    as for the scenario when the rotation interrupted halfway through the spin and reversed..
    in actor "first press" there is another rule say that when touch is inside AND attribute "second" = true - change "failed" to true

    and in actor "second press" there is another rule say that when touch is inside AND attribute "third" = true - change "failed" to true

    well you got the point, hope it will help someone someday,
    and ill be happy to hear more ideas for this!
Sign In or Register to comment.