Type Boolean
Object Body
Library physics.*
Revision 2017.3111
Keywords body, isFixedRotation


A boolean for whether the rotation of the body should be locked, even if the body is under load or subjected to off-center forces. The default is false.


-- Create a rectangle
local myRect = display.newRect( 0, 0, 20, 100 )

-- Add a body to the rectangle
physics.addBody( myRect, "dynamic" )

myRect.isFixedRotation = true