diff options
Diffstat (limited to 'modules/bullet/rigid_body_bullet.cpp')
-rw-r--r-- | modules/bullet/rigid_body_bullet.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp index 73f0393684..2d0e74eb6f 100644 --- a/modules/bullet/rigid_body_bullet.cpp +++ b/modules/bullet/rigid_body_bullet.cpp @@ -279,7 +279,7 @@ RigidBodyBullet::RigidBodyBullet() : // Initial properties const btVector3 localInertia(0, 0, 0); - btRigidBody::btRigidBodyConstructionInfo cInfo(mass, godotMotionState, NULL, localInertia); + btRigidBody::btRigidBodyConstructionInfo cInfo(mass, godotMotionState, BulletPhysicsServer::get_empty_shape(), localInertia); btBody = bulletnew(btRigidBody(cInfo)); setupBulletCollisionObject(btBody); @@ -315,7 +315,10 @@ void RigidBodyBullet::destroy_kinematic_utilities() { } void RigidBodyBullet::main_shape_resetted() { - btBody->setCollisionShape(get_main_shape()); + if (get_main_shape()) + btBody->setCollisionShape(get_main_shape()); + else + btBody->setCollisionShape(BulletPhysicsServer::get_empty_shape()); set_continuous_collision_detection(is_continuous_collision_detection_enabled()); // Reset } |