CreatePhysicsBox
Category: 2D Game Physics (Pro)
Signature
CreatePhysicsBox(world As Integer, x As Integer, y As Integer, width As Integer, height As Integer, isStatic As Boolean)
Returns
Integer
Description
Creates an oriented rectangular body centered at x, y and returns its body handle.
Performance and behavior
Static bodies do not move and have infinite mass. Dynamic bodies default to unit mass, 0.2 restitution, 0.5 friction, zero rotation, and unlocked rotation.
Pro feature: compiling code that uses this function requires a license with the GamePhysics feature enabled.
Example
ground = CreatePhysicsBox(world, 640, 680, 1280, 40, True)