Cl PhysicsSystem
PhysicsSystem class.
Manages a physics Box2D physics World. Automatically created if you set physics.active = true in the LevelData passed to a Level.
Derived from Object.
Functions
| update (dt) | Update physics system. |
| getWorld () | Get physics world object. |
| setCallbacks (beginContact, endContact, preSolve, postSolve) | Set your own callbacks for collision solvers. |
Functions
- update (dt)
-
Update physics system. The Level object handles this itself.
Parameters:
- dt number delta time
- getWorld ()
-
Get physics world object. Use Level.getPhysicsWorld when using a Level object.
Returns:
-
World
physics world
- setCallbacks (beginContact, endContact, preSolve, postSolve)
-
Set your own callbacks for collision solvers.
See World:setCallbacks for more info. Note that setting these yourself overrides the functionality of the CollisionResolver mixin.
Parameters:
- beginContact function
- endContact function
- preSolve function
- postSolve function