To use the physics system in your program, you must first create a PhysicsWorld component in your scene. A RigidBody component can be attached to a node to give it a physical properties like giving it a mass, friction, restitution and linear and angular velocities.
Constraints connect two rigid bodies together or a rigid body to a static point in the world.
Movement and Collision
Both a RigidBody and a CollisionShape are needed in a scene node to behave physically. You can add several collision shapes to a node to create compound shapes.
For more information, see the documentation for RigidBody
Physics Simulation Rate
The physics simulation has its own fixed update rate, which by default is 60Hz.
When the rendering framerate is higher than the physics update rate, physics motion is interpolated so that it always appears smooth. The update rate can be changed via the PhysicsWorld.Fps property. The physics update rate also determines the frequency of fixed timestep scene logic updates.
Hard limit for physics steps per frame or adaptive timestep can be configured with PhysicsWorld.MaxSubSteps property. These can help to prevent a "spiral of death" due to the CPU being unable to handle the physics load. However, note that using either can lead to time slowing down (when steps are limited) or inconsistent physics behavior (when using adaptive step.)
|CollisionData||Contains the information about a physics collision event.|
|CollisionEventMode||Rigid body collision event signaling mode.|
|CollisionShape||Physics collision shape component.|
|Constraint||Physics constraint component. Connects two rigid bodies together, or one rigid body to a static point.|
|ConstraintType||Supported constraint types.|
|PhysicsCollisionEndEventArgs||Event arguments for the PhysicsWorld's PhysicsCollisionEnd event|
|PhysicsCollisionEventArgs||Event arguments for the PhysicsWorld's PhysicsCollision event|
|PhysicsCollisionStartEventArgs||Event arguments for the PhysicsWorld's PhysicsCollisionStart event|
|PhysicsPostStepEventArgs||Event arguments for the PhysicsWorld's PhysicsPostStep event|
|PhysicsPreStepEventArgs||Event arguments for the PhysicsWorld's PhysicsPreStep event.|
|PhysicsRaycastResult||Physics raycast hit|
|PhysicsWorld||Physics simulation world component. Should be added only to the root scene node.|
|RigidBody||Physics rigid body component.|
|ShapeType||Collision shape type.|