defaultSolverIterations
The defaultSolverIterations determines how accurately Rigidbody joints and collision contacts are resolved. (default 6). Must be positive.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.PhysicsModule
public static int defaultSolverIterations { get; set; }
Remarks
If you are having trouble with connected Rigidbodies oscillating and behaving erratically setting a higher solver iteration count may improve their stability (but is slower).
This value is usually changed in inspector instead of from scripts.
Edit->Project Settings->PhysicsNote: Changing the defaultSolverIterations does not affect already created Rigidbodies. To change an existing Rigidbody please use Rigidbody.solverIterations.
Additional Resources: Physics.defaultSolverVelocityIterations.
Examples
using UnityEngine;public class Example : MonoBehaviour{ void Start() { Physics.defaultSolverIterations = 10; }}