Activation States not working

trying
Posts: 15
Joined: Sat May 16, 2015 4:32 pm

Activation States not working

Post by trying »

Hello,

When I try to activate a deactivated body it still remains deactivated.

For deactivation:

Code: Select all

object->setActivationState(DISABLE_SIMULATION);

For activation:

Code: Select all

object->activate();
trying
Posts: 15
Joined: Sat May 16, 2015 4:32 pm

Re: Activation States not working

Post by trying »

Fixed it.

For Deactivation:

Code: Select all

object->setActivationState(DISABLE_SIMULATION);
For Activation:

Code: Select all

object->forceActivationState(DISABLE_DEACTIVATION);
gdlk
Posts: 62
Joined: Fri Oct 24, 2014 7:01 pm

Re: Activation States not working

Post by gdlk »

m... I don't think is a good idea activate with disable_deactivation (unless it is what you want), because the body will lose the ability to sleep (so performance could be affect)

try forcing the activation state

Code: Select all

object->activate(true)