Fraction of inner radius allowed to penetrate during CCD. Provides penetration slop for stability.
Fraction of inner radius to trigger CCD. If movement < (threshold * innerRadius), use discrete update. Lower = more CCD (expensive), Higher = more tunneling risk.
Minimum relative velocity for restitution (bounce) in CCD. Below this, collisions are perfectly inelastic. Unit: m/s
Contact cache settings
Gravity vector. Unit: m/s²
Enable/disable gravity globally.
Collision layers
Narrowphase collision detection settings
When false, we prevent collision against non-active (shared) edges. Mainly useful for triangle meshes to avoid ghost collisions at shared edges.
Collide with backfaces during raycasts/shapecasts.
If objects are closer than this distance, they are considered to be colliding (used for GJK). Unit: meters
Max distance to use to determine if two points are on the same plane for determining the contact manifold between two shape faces. Unit: meters
Maximum angle between normals that allows manifolds between different sub shapes of the same body pair to be combined. Stored as cos(max angle).
A factor that determines the accuracy of the penetration depth calculation. If the change of the squared distance is less than tolerance * current_penetration_depth^2 the algorithm will terminate. Unit: dimensionless
Whether to return the deepest point during collision detection.
Radius around objects inside which speculative contact points will be detected. Note that if this is too big you will get ghost collisions as speculative contacts are based on the closest points during the collision detection step which may not be the actual closest points by the time the two objects hit. Unit: meters
Whether or not to reduce manifolds with similar contact normals into one contact manifold. This groups contacts with similar normals that come from different SubShapeIDs (e.g. different triangles in a mesh shape or different compound shapes). If you need to track exactly which SubShapeIDs are in contact, turn this off per-body using body.useManifoldReduction = false.
Sleeping options
If objects can go to sleep or not. Sleeping bodies are excluded from physics simulation until woken.
To detect if an object is sleeping, we use 3 points:
The movement of these points is tracked and if the velocity of all 3 points is lower than this value, the object is allowed to go to sleep. Unit: m/s
Time before object is allowed to go to sleep. Unit: seconds
Solver options
Baumgarte stabilization factor (how much of the position error to 'fix' in 1 update). Unit: dimensionless Range: 0 (nothing) to 1 (100%)
Maximum distance to correct in a single iteration when solving position constraints. Unit: meters
Minimal velocity needed before a collision can be elastic. If the relative velocity between colliding objects in the direction of the contact normal is lower than this, the restitution will be zero regardless of the configured value. This lets an object settle sooner. Unit: m/s
How much bodies are allowed to sink into each other. Used to avoid jitter when objects are stacked. Unit: meters
Number of solver position iterations to run.
Number of solver velocity iterations to run. Note that this needs to be >= 2 in order for friction to work (friction is applied using the non-penetration impulse from the previous iteration).
Scale factor for warm start impulses.
Whether or not to use warm starting for constraints (initially applying previous frames impulses). This helps the solver converge faster.
Continuous Collision Detection (CCD) options