Multitouch
robert.mccarthy
Member Posts: 165
Hello All,
I was wondering if there was a tutorial on multi-touch to move and 'rotate' an actor?
I know how to get multi-touch working for two seperate actors, but need to know how to get it to work out how it will rotate an actor when I select it.
Thanks,
I was wondering if there was a tutorial on multi-touch to move and 'rotate' an actor?
I know how to get multi-touch working for two seperate actors, but need to know how to get it to work out how it will rotate an actor when I select it.
Thanks,
Comments
make two attributes spinX and spinY
create an invisible actor with rule:
when touch is pressed,
Constrain self.positionY to touchY,
Constrain self.positionX to touchX,
Constrain game.spinY to self.positionY,
Constrain game.spinX to self.positionX,
Spinning:
When touch is pressed and inside
constrain self.rotation to VectorToAngle(self.positionX-game.spinX, self.position.Y-game.spinY)
Hope this helps....