In this video the presenter mentions a RigidBody being asleep? How is that done?

In this video, about 14 minutes in the presenter mentions physics changes only being made when the RigidBody is asleep.

I know about enabling/disabling GameObjects but disabling an object makes it invisible in the scene.

Also I know about the Awake() function being called on an object being enabled. But I get the impression that the presenter doesn’t mean enabling/disabling a GameObject. Therefore…

  1. How is a RigidBody put asleep?
  2. How is it woken back up?
  3. How can we tell if a RigidBody is asleep (or awake)?

Yeah, he doesn’t mean enabling gameobjects.

A RigidBody goes to sleep automatically when it falls under a certain velocity, and wakes up above it. You can change it via code or in the project settings… under physics I believe?

You can tell if it’s awake by calling IsSleeping . Wonder if you can just set that variable as well, don’t know. Doesn’t say it’s read only.

Thanks Divinux.