World
Properties
Get the number of awake bodies.
The hit event speed threshold, usually in m/s. Collisions above this speed generate hit events.
Enable or disable continuous collision.
Enable or disable sleeping.
The maximum linear speed, usually in m/s.
The restitution speed threshold, usually in m/s. Collisions above this speed have restitution applied.
Functions
Cast a ray against the world. The callback is called for each shape hit. Return the fraction to clip the ray for the next hit, 0 to terminate, or 1 to not clip.
Cast a ray and return the closest hit.
Collide a capsule mover with the world. The callback receives collision planes.
Create a new body in this world.
Create a distance joint.
Create a filter joint to disable collision between two bodies. This is more efficient than using collision filtering when you need to disable collision between a specific pair of bodies.
Create a motor joint.
Create a mouse joint.
Create a prismatic (slider) joint.
Create a revolute (hinge) joint.
Create a weld joint.
Create a wheel joint.
Destroy a body and remove it from the world.
Destroy a joint.
Apply a radial explosion.
Get body move events from the last simulation step. Body move events indicate bodies that have moved and can be used to update game objects.
Get contact events from the last simulation step.
Get world simulation counters for diagnostics.
Get sensor events from the last simulation step.
Query an AABB for overlapping shapes. The callback is called for each shape found. Return true from the callback to continue the query, false to stop.
Query for shapes overlapping a shape proxy. The callback is called for each shape found. Return true from the callback to continue the query, false to stop.
Adjust contact tuning parameters.
Set a custom collision filter callback. This is called before contact creation. Return false to disable a contact between two shapes.
Set a pre-solve callback. This is called after contact creation but before the solver. Return false to disable the contact for this step.