Type Function Object Body Library physics.* Return value none Revision 2017.3060 Keywords body, applyTorque See also object:applyAngularImpulse() object:applyForce() object:applyLinearImpulse()
A function that accepts a numerical value for applied rotational force. The body will rotate about its center of mass.
object:applyTorque( appliedForce )
Number. Amount of force to be applied.
-- Create a rectangle local myRect = display.newRect( 0, 0, 100, 100 ) -- Add a body to the rectangle physics.addBody( myRect, "dynamic" ) myRect:applyTorque( 100 )