useSubStepContacts
Whether to calculate contacts for all simulation sub-steps or only the first sub-step.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
public static bool useSubStepContacts { get; set; }
Remarks
When simulation sub-stepping is enabled with _useSubStepping, this property is used to control the whether or not contacts are calculated for all sub-steps or only the first sub-step.
When enabled, contacts are calculated for all sub-steps. This provides a more accurate simulation for each sub-step but will reduce performance. In most cases, this extra contact calculation isn't required.
When disabled, contacts are only calculated for the first sub-step. Subsequent sub-steps only perform integration and constraint solving. This increases performance whilst still maintaining a stable simulation. In most cases, this should be used.
Additional Resources: _useSubStepping, _minSubStepFPS, _maxSubStepCount, _subStepCount, _subStepLostTime