Physics
Index
Constructors
Properties
- acc
- bodiesCanSleepByDefault
- boundsPadding
- broadphaseStrategy
- checkForFastBodies
- collisionResolutionStrategy
- defaultMass
- disableMinimumSpeedForFastBody
- dynamicTreeVelocityMultiplier
- enabled
- integrator
- positionIterations
- sleepBias
- sleepEpsilon
- slop
- steeringFactor
- surfaceEpsilon
- velocityIterations
- wakeThreshold
- warmStart
Accessors
Methods
Constructors
constructor
Returns Physics
Properties
publicstaticacc
publicstaticbodiesCanSleepByDefault
By default bodies do not sleep
publicstaticboundsPadding
Pad RigidBody BoundingBox by a constant amount
publicstaticbroadphaseStrategy
Gets or sets the broadphase pair identification strategy.
The default strategy is BroadphaseStrategy.DynamicAABBTree which uses a binary tree of axis-aligned bounding boxes to identify potential collision pairs which is O(nlog(n)) faster.
publicstaticcheckForFastBodies
Enable fast moving body checking, this enables checking for collision pairs via raycast for fast moving objects to prevent bodies from tunneling through one another.
publicstaticcollisionResolutionStrategy
Gets or sets the global collision resolution strategy (narrowphase).
The default is SolverStrategy.Arcade which performs simple axis aligned arcade style physics.
More advanced rigid body physics are enabled by setting SolverStrategy.Realistic which allows for complicated simulated physical interactions.
publicstaticdefaultMass
The default mass to use if none is specified
publicstaticdisableMinimumSpeedForFastBody
Disable minimum fast moving body raycast, by default if ex.Physics.checkForFastBodies = true Excalibur will only check if the body is moving at least half of its minimum dimension in an update. If ex.Physics.disableMinimumSpeedForFastBody is set to true, Excalibur will always perform the fast body raycast regardless of speed.
publicstaticdynamicTreeVelocityMultiplier
Factor to add to the RigidBody BoundingBox, bounding box (dimensions += vel * dynamicTreeVelocityMultiplier);
publicstaticenabled
Globally switches all Excalibur physics behavior on or off.
publicstaticintegrator
Gets or sets the position and velocity positional integrator, currently only Euler is supported.
publicstaticpositionIterations
Number of position iterations (overlap) to run in the solver
publicstaticsleepBias
publicstaticsleepEpsilon
publicstaticslop
Amount of overlap to tolerate in pixels
publicstaticsteeringFactor
Amount of positional overlap correction to apply each position iteration of the solver O - meaning no correction, 1 - meaning correct all overlap
publicstaticsurfaceEpsilon
Surface epsilon is used to help deal with surface penetration
publicstaticvelocityIterations
Number of velocity iteration (response) to run in the solver
publicstaticwakeThreshold
publicstaticwarmStart
Warm start set to true re-uses impulses from previous frames back in the solver
Accessors
publicstaticgravity
Methods
publicstaticuseArcadePhysics
Configures Excalibur to use "arcade" physics. Arcade physics which performs simple axis aligned arcade style physics.
Returns void
publicstaticuseRealisticPhysics
Configures Excalibur to use rigid body physics. Rigid body physics allows for complicated simulated physical interactions.
Returns void
The Physics object is the global configuration object for all Excalibur physics.
Use engine args to configure Physics
new ex.Engine({physics: {...}})
, will be removed in v0.30