diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-11-23 15:01:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-23 15:01:13 +0100 |
commit | ee3179fc5c3e5f10534d5166aebbe5b64f3bfc92 (patch) | |
tree | 02d225e3525eaf157ec689df7bf3def6985e5640 /modules | |
parent | 949871cba6f262181e35e8adaee7e2bcf27ed2b2 (diff) | |
parent | 0a0800ebec9f8a5c6158b317e417c19995c027cc (diff) |
Merge pull request #13212 from AndreaCatania/margin
Removed shape margin
Diffstat (limited to 'modules')
-rw-r--r-- | modules/bullet/collision_object_bullet.cpp | 6 | ||||
-rw-r--r-- | modules/bullet/shape_bullet.cpp | 1 |
2 files changed, 4 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()); diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp index 49150484d9..f51af93a31 100644 --- a/modules/bullet/shape_bullet.cpp +++ b/modules/bullet/shape_bullet.cpp @@ -45,6 +45,7 @@ ShapeBullet::~ShapeBullet() {} btCollisionShape *ShapeBullet::prepare(btCollisionShape *p_btShape) const { p_btShape->setUserPointer(const_cast<ShapeBullet *>(this)); + p_btShape->setMargin(0.); return p_btShape; } |