multi touch

fullviewmediafullviewmedia Member Posts: 92
edited November -1 in Working with GS (Mac)
Hi all,

I am working on a game where I need to drag blocks on to the scene from the side and then use multi touch to rotate the block. I have seen an example somewhere but with no breakdown or instructions.

I'd even settle for touching middle of block to move, touch either end to rotate.

Any ideas, pulling hair out....

Thanks

John

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    In the expression editor Under device attributes youll see touch count. Thats how many touchs are on the scene at the same time. So if you wanted them to rotate when three fingers are on, you would have a rule when attribute touch count =3 then hit the plus sign next to that rule to put another rule in the same one and have when touch is pressed. then have your rotation rules under.
  • fullviewmediafullviewmedia Member Posts: 92
    Do you happen to know how to calc the angle between to fingers (if you get what I mean)?

    Thanks

    John
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    you would use vector to angle

    vectorToAngle

    Usage: vectorToAngle(x,y)

    Find the angle relative to the origin, (0,0), given an X and Y coordinate. You can include an offset,(x',y'), to find an angle relative to the offset.

    e.g. vectorToAngle(x-x',y-y')
  • fullviewmediafullviewmedia Member Posts: 92
    Maybe i'm not cut out for this, maths was never my strong point :(, thanks for the help though, I'll keep trying
  • fullviewmediafullviewmedia Member Posts: 92
    I am trying to achieve this http://gamesalad.com/game/play/56582, I really could do with some help :(
  • spliketspliket Member Posts: 93
    i think that everything you need to do this is in this post. put together the vectorToAngle and the touch count and you should have your solution.
  • fullviewmediafullviewmedia Member Posts: 92
    Your will be right I just am new to this and finding it harder than I thought, I'll keep trying, thanks
Sign In or Register to comment.