summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/bullet/rigid_body_bullet.cpp2
-rw-r--r--modules/bullet/space_bullet.cpp2
2 files changed, 1 insertions, 3 deletions
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index 0d2cd1f5a0..22e7b6fe64 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -303,6 +303,7 @@ RigidBodyBullet::~RigidBodyBullet() {
void RigidBodyBullet::init_kinematic_utilities() {
kinematic_utilities = memnew(KinematicUtilities(this));
+ reload_kinematic_shapes();
}
void RigidBodyBullet::destroy_kinematic_utilities() {
@@ -534,7 +535,6 @@ void RigidBodyBullet::set_mode(PhysicsServer3D::BodyMode p_mode) {
mode = PhysicsServer3D::BODY_MODE_KINEMATIC;
reload_axis_lock();
_internal_set_mass(0);
- init_kinematic_utilities();
break;
case PhysicsServer3D::BODY_MODE_STATIC:
mode = PhysicsServer3D::BODY_MODE_STATIC;
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index a9a811c445..0cfd658bd5 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -947,7 +947,6 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform3D &p
if (!p_body->get_kinematic_utilities()) {
p_body->init_kinematic_utilities();
- p_body->reload_kinematic_shapes();
}
btVector3 initial_recover_motion(0, 0, 0);
@@ -1089,7 +1088,6 @@ int SpaceBullet::test_ray_separation(RigidBodyBullet *p_body, const Transform3D
if (!p_body->get_kinematic_utilities()) {
p_body->init_kinematic_utilities();
- p_body->reload_kinematic_shapes();
}
btVector3 recover_motion(0, 0, 0);