← Documentation Home

SetBodyStatic

Category: 2D Game Physics (Pro)

Back to System Functions


Signature

SetBodyStatic(body As Integer, isStatic As Boolean)

Returns

Void

Description

Switches an existing body between dynamic and static without changing its handle.

Performance and behavior

Making a body static clears its linear and angular velocity. A static body remains movable through SetBodyPosition and SetBodyRotation.

Pro feature: requires GamePhysics.

Example

SetBodyStatic platform, True