SetBodyRotation
Category: 2D Game Physics (Pro)
Signature
SetBodyRotation(body As Integer, rotation As Double)
Returns
Void
Description
Sets a body's angle in degrees. Rotated boxes use the new angle for collision detection immediately.
Performance and behavior
Works for dynamic and static bodies. Rotation-locked bodies may still be positioned at a fixed angle with this function.
Pro feature: requires GamePhysics.
Example
SetBodyRotation ramp, -12.5