Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

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

Sleep(): void;
void Sleep();
def Sleep() as void

Description

Make the rigidbody "sleep".

Sleeping is an optimisation that is used to temporarily remove an object from physics simulation when it is at rest. This function makes the rigidbody sleep - it is sometimes desirable to enable this manually rather than allowing automatic sleeping with the sleepMode property.

See Also: IsSleeping, WakeUp, sleepMode.