Physics

physics

Settings for the physics engine.

Attributes

AttributeTypeDefaultDescription
enginestringphysxThe engine that is powering the physics of the scene.
gravityvec3[ 0, -9.8, 0 ]Global gravity applied throughout the scene.
timestepInSfloat0.01666A frame-rate-independent interval that dictates when physics calculations are performed.
epsilonfloat0.000001The epsilon used to mark whether the transform of an entity has changed and so whether to notify the physics engine.
toleranceLengthfloat1The approximate size of objects in the simulation. This is used to estimate certain length-related tolerances.
toleranceSpeedfloat10The typical magnitude of velocities of objects in simulation. This is used to estimate whether a contact should be treated as bouncing or resting based on its impact velocity, and a kinetic energy threshold below which the simulation may put objects to sleep. For normal physical environments, a good choice is the approximate speed of an object falling under gravity for one second.
lmdMaxfloat1The bigger LMD Max is, the greater the area that is searched for future contacts, and so the greater time taken per iteration. Note that XDE resolves contacts pre-collision, not once collision has taken place, like the majority of physics engines. Displacement of any object per iteration should not exceed LMD Max.