activation states

jackskelyton
Posts: 32
Joined: Mon Nov 05, 2007 3:52 pm

activation states

Post by jackskelyton »

what do the different activation options do for btCollisionObject? I'm looking at DISABLE_SIMULATION and I'm not sure what it's for.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: activation states

Post by Erwin Coumans »

jackskelyton wrote:what do the different activation options do for btCollisionObject? I'm looking at DISABLE_SIMULATION and I'm not sure what it's for.
Activation states are introduced to help performance optimizations: avoid simulation of objects that don't move anymore.
  • ACTIVE_TAG is for active rigid bodies.
  • ISLAND_SLEEPING is for deactived rigid bodies. When objects hardly move for a while, they become deactivated.
  • WANTS_DEACTIVATION: the rigidbody has hardly been moving for several frames, but there are active rigidbodies closeby, so the island cannot be deactivated. As soon as all objects in an island have the WANTS_DEACTIVATION state, the entire island becomes ISLAND_SLEEPING.
  • DISABLE_DEACTIVATION: avoid a rigidbody to become deactivated. Handy for main player character etc.
  • DISABLE_SIMULATION: internally used state when a failure is detected, it stops simulation of rigidbody.
Hope this helps,
Erwin