summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-11-21 19:24:52 +0100
committerGitHub <noreply@github.com>2017-11-21 19:24:52 +0100
commit9ebc6ab45a375310f650bf3afd31f076215ac52c (patch)
tree52fae4dd44f84aa6eca7b64f7c5e60e0f198bcae /modules
parent640856f4d4f4e4d10e9f793caf6ac6f4d22678e6 (diff)
parent967854f8e94b1070ae3e283f654e3c8a3c14bd65 (diff)
Merge pull request #13145 from AndreaCatania/grav
Set gravity on change body mode
Diffstat (limited to 'modules')
-rw-r--r--modules/bullet/rigid_body_bullet.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index 98ae82bc5f..f5ab8221e3 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -511,12 +511,14 @@ void RigidBodyBullet::set_mode(PhysicsServer::BodyMode p_mode) {
mode = PhysicsServer::BODY_MODE_RIGID;
set_axis_lock(axis_lock); // Reload axis lock
_internal_set_mass(0 == mass ? 1 : mass);
+ scratch_space_override_modificator();
break;
}
case PhysicsServer::BODY_MODE_CHARACTER: {
mode = PhysicsServer::BODY_MODE_CHARACTER;
set_axis_lock(axis_lock); // Reload axis lock
_internal_set_mass(0 == mass ? 1 : mass);
+ scratch_space_override_modificator();
break;
}
}