Fixed dispatch callback

This commit is contained in:
AndreaCatania 2017-12-23 12:36:51 +01:00
parent aea1b2e6c3
commit 0f5c87bfa4

View file

@ -339,7 +339,7 @@ void RigidBodyBullet::set_space(SpaceBullet *p_space) {
void RigidBodyBullet::dispatch_callbacks() {
/// The check isTransformChanged is necessary in order to call integrated forces only when the first transform is sent
if (previousActiveState != btBody->isActive() && force_integration_callback && isTransformChanged) {
if ((btBody->isActive() || previousActiveState != btBody->isActive()) && force_integration_callback && isTransformChanged) {
BulletPhysicsDirectBodyState *bodyDirect = BulletPhysicsDirectBodyState::get_singleton(this);