I have a rectangle that is a physics body. I want to rotate that body based on user input (two finger touch and twist) and keep the physics interactions enabled. Any thoughts on how to do this? [import]uid: 60707 topic_id: 30074 reply_id: 330074[/import]
The way to rotate a physics body is to apply either impulse or force off-center to it. To leave the body in place as it rotates, apply two impulses, at points equidistant from center and 180 degrees from each other, in opposite directions.
How to detect the two-finger twist is another matter - is that what you’re asking for? [import]uid: 160496 topic_id: 30074 reply_id: 120455[/import]
Hello Chris!,
They way I would go about turning the object with two fingers is by registering each touch, grab each touches x and y position, and use some trigonometry to figure out the angle at which the two fingers are at. Not too difficult with some math! Yay! We love math!
Haha 
Chris Zielinski,
Big Z Labs.
@BigZLabs
bit.ly/BigZLabsTwitter [import]uid: 17138 topic_id: 30074 reply_id: 120459[/import]
The way to rotate a physics body is to apply either impulse or force off-center to it. To leave the body in place as it rotates, apply two impulses, at points equidistant from center and 180 degrees from each other, in opposite directions.
How to detect the two-finger twist is another matter - is that what you’re asking for? [import]uid: 160496 topic_id: 30074 reply_id: 120455[/import]
Hello Chris!,
They way I would go about turning the object with two fingers is by registering each touch, grab each touches x and y position, and use some trigonometry to figure out the angle at which the two fingers are at. Not too difficult with some math! Yay! We love math!
Haha 
Chris Zielinski,
Big Z Labs.
@BigZLabs
bit.ly/BigZLabsTwitter [import]uid: 17138 topic_id: 30074 reply_id: 120459[/import]