Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

PhysicsWorld.bounceIterations

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public int bounceIterations;

Description

The number of bounce passes the world runs each simulation step, after contacts and joints have been solved. Each pass pushes apart the bodies of every contact that struck with a bounciness above zero, at the speed its bounciness allows, and never adds energy. More passes let a bounce settle more accurately, which reduces unwanted spinning of bouncing boxes, and each pass adds work for every bouncy contact in the world. The value must be from zero up to the maximum bounce pass count. With zero, contacts never bounce whatever their bounciness.

The maximum bounce pass count is PhysicsConstants.MaxBounceIterations. Setting a value outside zero to that maximum logs a warning and leaves the current value unchanged. See PhysicsWorld.bouncePropagation and PhysicsShape.SurfaceMaterial.bounciness.