physics
Settings for the physics engine.
Attributes
Attribute | Type | Default | Description |
---|---|---|---|
engine | string | physx | The engine that is powering the physics of the scene. |
gravity | vec3 | [ 0, -9.8, 0 ] | Global gravity applied throughout the scene. |
timestepInS | float | 0.01666 | A frame-rate-independent interval that dictates when physics calculations are performed. |
epsilon | float | 0.000001 | The epsilon used to mark whether the transform of an entity has changed and so whether to notify the physics engine. |
toleranceLength | float | 1 | The approximate size of objects in the simulation. This is used to estimate certain length-related tolerances. |
toleranceSpeed | float | 10 | The 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. |
lmdMax | float | 1 | The 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. |