Tracking multi touches independently

lovelostlovelost Member Posts: 7
edited November -1 in Working with GS (Mac)
Hi there. I'm new to GS and have read most of the posts on multi touch that I could find.

Is there a way to have several actors independently move around to touches? Say I have two blobs in the scene and I want the user to move them freely using two fingers at the same time. The blobs would not be constrained to independent areas of the scene.

Because the blobs could fire touch events in any order, I can't know which is Touch 1 or Touch 2 until the event is triggered. And so I can't see, in the expression editor, how I could index the touch programmatically. In my mind I'm thinking: if touch is fired on this actor, make a note of which touch it is. Then reference that touch later when moving the actor. But in expression editor, when I create a constrain attribute for the actor's position, I don't see how I can index in to devices.touches.blah to identify which touch I want to track. Am probably going about it the wrong way as am new.

Comments

  • lovelostlovelost Member Posts: 7
    ... Am guessing enumerating multi touches programatically isn't possible yet, then? Is this on a roadmap -- perhaps it's tied to arrays on your roadmap, for Winter?
  • svnsvn Member Posts: 445
    actually, I'm pretty sure under Devices in the Attributes browser, there are up to seven touches. So for Actor 1, tell it to move to "touch.Touch1.position.X" and for Actor 2, tell it to move to "touch.Touch2.position.X".
    BTW Touch 1 is the first touch! Touch 2 is the second, and so on.
  • lovelostlovelost Member Posts: 7
    ... Thanks, but in your example, what if actor 2 is touched first? In my scenario, either actor could be touched first, so I can't know at design time which will get touch 1 or touch 2.
Sign In or Register to comment.