From 967854f8e94b1070ae3e283f654e3c8a3c14bd65 Mon Sep 17 00:00:00 2001 From: AndreaCatania Date: Tue, 21 Nov 2017 18:31:43 +0100 Subject: Set gravity on change body mode Fixes #13140 --- modules/bullet/rigid_body_bullet.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules') 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; } } -- cgit v1.2.3