summaryrefslogtreecommitdiffstats
path: root/modules/bullet/collision_object_bullet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bullet/collision_object_bullet.cpp')
-rw-r--r--modules/bullet/collision_object_bullet.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/bullet/collision_object_bullet.cpp b/modules/bullet/collision_object_bullet.cpp
index 91a049b1f3..5e878b0ee4 100644
--- a/modules/bullet/collision_object_bullet.cpp
+++ b/modules/bullet/collision_object_bullet.cpp
@@ -285,10 +285,10 @@ void RigidCollisionObjectBullet::on_shapes_changed() {
const int size = shapes.size();
for (i = 0; i < size; ++i) {
shpWrapper = &shapes[i];
- if (!shpWrapper->bt_shape) {
- shpWrapper->bt_shape = shpWrapper->shape->create_bt_shape();
- }
if (shpWrapper->active) {
+ if (!shpWrapper->bt_shape) {
+ shpWrapper->bt_shape = shpWrapper->shape->create_bt_shape();
+ }
compoundShape->addChildShape(shpWrapper->transform, shpWrapper->bt_shape);
} else {
compoundShape->addChildShape(shpWrapper->transform, BulletPhysicsServer::get_empty_shape());