how to single drag an actor when multitouch?
rdcube
Member Posts: 361
Hi y'all,
I have a couple of actors on screen but I only want to be able to move one at a time.
When I touch multiple at the same time, the actor triggers several others and they all 'collide' and/or get grouped together.
I have set the 'touch.count' = 1 and play with less than and less than equal to 1, but none seem to work.
I tried following a couple of threads in relation to multitouch and drag/drop, but no sample/demo to follow with my need.
Any tips would be appreciated.
Thanks!
I have a couple of actors on screen but I only want to be able to move one at a time.
When I touch multiple at the same time, the actor triggers several others and they all 'collide' and/or get grouped together.
I have set the 'touch.count' = 1 and play with less than and less than equal to 1, but none seem to work.
I tried following a couple of threads in relation to multitouch and drag/drop, but no sample/demo to follow with my need.
Any tips would be appreciated.
Thanks!
Comments
EDIT: here it is... http://gamesalad.com/game/play/81660
P.S. I don't really understand so that probably won't help (it's too early here )
In each draggable actor have a rule that says when game.dragging is false and touch is pressed change game.dragging to 1, constrain x and y to touchX and touchY. Otherwise change game.dragging to 0.
Put the touch rule within the game.dragging rule and put the change to 0 in the otherwise of the touch rule.
On scitunes idea (when dragging change to false) is set on all actors, so that means that when one of them clicks, it triggers to true, making none draggable.
I'm not on my Mac to try RH demo, but the main issue to solve, is being able to drag one actor at a time regardless of how many fingers are on screen.
I submitted my app last night (hope it gets approved by Halloween); but if anyone has a solution to my problem (or test RH demo to test on device for selecting/touching more than one at a time), I might reject the binary and resubmit or have it as an update.
If you select all at the same time, they get grouped together...almost impossible to break apart
Any other suggestions?