CreatePhysicsWorld
Category: 2D Game Physics (Pro)
Signature
CreatePhysicsWorld(gravityX As Double, gravityY As Double)
Returns
Integer
Description
Creates an independent native 2D physics world and returns its handle.
Performance and behavior
The world uses a fixed 120 Hz simulation step internally. Positive Y gravity points down in screen coordinates. Up to 16 worlds may exist at once.
Pro feature: compiling code that uses this function requires a license with the GamePhysics feature enabled.
Example
world = CreatePhysicsWorld(0, 980)