← Documentation Home

FreePhysicsBody

Category: 2D Game Physics (Pro)

Back to System Functions


Signature

FreePhysicsBody(body As Integer)

Returns

Void

Description

Removes a body from its world and invalidates its handle.

Performance and behavior

Body handles contain a generation value, so a stale handle cannot accidentally control a later body that reuses the same storage slot.

Pro feature: compiling code that uses this function requires a license with the GamePhysics feature enabled.

Example

FreePhysicsBody ball