Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Obsolete
The sleepVelocity is no longer supported. Use sleepThreshold. Note that sleepThreshold is energy but not velocity.

Physics.sleepVelocity

Switch to Manual
public static var sleepVelocity: float;

Description

The default linear velocity, below which objects start going to sleep (default 0.15). Must be positive.

See the Physics Overview in the manual for more information about Rigidbody sleeping. This value can be overridden per rigidbody using Rigidbody.sleepVelocity.

This value is usually changed in Edit->Project Settings->Physics inspector instead of from scripts.

	Physics.sleepVelocity = 0.1;