diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-11-21 19:24:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-21 19:24:52 +0100 |
commit | 9ebc6ab45a375310f650bf3afd31f076215ac52c (patch) | |
tree | 52fae4dd44f84aa6eca7b64f7c5e60e0f198bcae /modules/bullet/rigid_body_bullet.cpp | |
parent | 640856f4d4f4e4d10e9f793caf6ac6f4d22678e6 (diff) | |
parent | 967854f8e94b1070ae3e283f654e3c8a3c14bd65 (diff) |
Merge pull request #13145 from AndreaCatania/grav
Set gravity on change body mode
Diffstat (limited to 'modules/bullet/rigid_body_bullet.cpp')
-rw-r--r-- | modules/bullet/rigid_body_bullet.cpp | 2 |
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; } } |