Click or drag to resize
DigitalRuneConstraintSettingsStackingFactor Property
Gets or sets the stacking optimization factor. (Experimental)

Namespace: DigitalRune.Physics.Settings
Assembly: DigitalRune.Physics (in DigitalRune.Physics.dll) Version: 1.10.0.0 (1.10.0.14427)
Syntax
public float StackingFactor { get; set; }

Property Value

Type: Single
The stacking optimization factor in the range [0, ∞[. The default value is 0.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionvalue is negative.
Remarks

Stacking objects is difficult for the simulation - especially if the FixedTimeStep is large or the NumberOfConstraintIterations is low. The stacking optimization is a trick to improve the stability of stacking by reducing the gravity acceleration of objects in a stack. If StackingFactor is 0, the optimization is disabled. Non-zero values enable the stacking optimization. Higher values use a more aggressive optimization. Recommended values are 0 - 10.

This stacking optimization is independent from the StackingTolerance optimization.

See Also