A DynamicsWorld object can be constructed with PhysicsDevice.createDynamicsWorld.
Summary
Updates the state of the physics simulation. Only needs to be called once per frame.
Syntax
dynamicsWorld.update();
Summary
Performs a ray query against the physics world.
Syntax
var rayHit = dynamicsWorld.rayTest({
from: hitScanStart,
to: hitScanEndPoint,
group: physicsDevice.FILTER_PROJECTILE,
exclude: ownerPhysicsObject
});
if (rayHit)
{
}
Returns a RayHit object if the test succeeded, null otherwise.
Summary
Performs a convex sweep query against the physics world.
Syntax
var hit = dynamicsWorld.convexSweepTest({
shape: queryShape,
from: transformStart,
to: transformEnd,
group: physicsDevice.FILTER_PROJECTILE,
exclude: myRigidBody
});
Returns a RayHit object if the test succeeded, null otherwise.
Summary
Adds a collision object to the simulation.
Syntax
dynamicsWorld.addCollisionObject(collisionObject);
Summary
Removes a collision object from the simulation.
Syntax
dynamicsWorld.removeCollisionObject(collisionObject);
Summary
Adds a rigid body to the simulation.
Syntax
dynamicsWorld.addRigidBody(rigidBody);
Summary
Removes a rigid body from the simulation.
Syntax
dynamicsWorld.removeRigidBody(rigidBody);
Summary
Adds a constraint to the simulation.
Syntax
dynamicsWorld.addConstraint(constraint);
Summary
Removes a constraint from the simulation.
Syntax
dynamicsWorld.removeConstraint(constraint);
Summary
Adds a Character object to the simulation.
Syntax
dynamicsWorld.addCharacter(character);
Summary
The maximum number of substeps the simulation will perform per frame.
Syntax
var maxSubSteps = dynamicsWorld.maxSubSteps;
Note
Read Only
Summary
Fixed simulation time in seconds per substep.
Syntax
var fixedTimeStep = dynamicsWorld.fixedTimeStep;
Note
Read Only
Summary
The direction and magnitude of a global gravity force applied to the whole scene per frame.
Syntax
var gravity = dynamicsWorld.gravity;
Note
Read Only