rotate a actor when is touched with two fingers?
guilleface
Member Posts: 1,014
hi,i need to rotate a actor but only when is touched by two fingers in the same time and both fingers are inside the actor, is this possible? right now all i can try is when touch is pressed and touch count=2, but with this , i can have 1 finger inside the actor and when i touch anywhere on the screen with a second finger then my actor rotates but both fingers are not inside.
Comments
The corner points are:
P1(actor.x+cos(rotation)*width/2, actor.y+sin(rotation)*height/2)
P2(actor.x+cos(rotation)*width/2, actor.y-sin(rotation)*height/2)
P3(actor.x-cos(rotation)*width/2, actor.y+sin(rotation)*height/2)
P4(actor.x-cos(rotation)*width/2, actor.y-sin(rotation)*height/2)
So you'll need to check if the touch1 and touch2 are inside that area.
If you want me to make a demo file, let me know.