summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-12-23 11:55:15 -0300
committerGitHub <noreply@github.com>2017-12-23 11:55:15 -0300
commit9969c5c6a1cc103fb7b23c279b7fde0d92a5599a (patch)
tree210c858087b84eacc0a287719d7b9281010f696b
parent59ec417e4a3f61896acb5873efd115518e83e356 (diff)
parent0f5c87bfa4f4380b85b453f223ae0940d87e2ff5 (diff)
Merge pull request #14978 from AndreaCatania/intshap
Fixed dispatch callback
-rw-r--r--modules/bullet/rigid_body_bullet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index 26a4eeb065..5e736c1856 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -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);