← Documentation Home

BodyRotation

Category: 2D Game Physics (Pro)

Back to System Functions


Signature

BodyRotation(body As Integer)

Returns

Double

Description

Returns the body's current angle in degrees.

Performance and behavior

Angles integrated by the simulation wrap near -180 to 180 degrees. Invalid handles return 0.

Pro feature: requires GamePhysics.

Example

SetDrawRotation BodyRotation(crate)