SetBodyRotationLocked
Category: 2D Game Physics (Pro)
Signature
SetBodyRotationLocked(body As Integer, locked As Boolean)
Returns
Void
Description
Controls whether a body may rotate during simulation.
Performance and behavior
Locking clears angular velocity and prevents contact impulses from adding spin. The current angle is preserved.
Pro feature: requires GamePhysics.
Example
SetBodyRotationLocked player, True