summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrea Catania <info@andreacatania.com>2018-08-11 10:25:56 +0200
committerAndrea Catania <info@andreacatania.com>2018-08-18 15:11:51 +0200
commit9826456f2e78b3502f646ffa5445c76c6d31f7ea (patch)
tree27d8de2ae0e5be181db8be41b4d036096ebe58ad /modules
parent0fbc5b3bbf0017153969af328072c3dc969069f5 (diff)
Improved move_and_slide function to stay on slope and fall on steep slope
Diffstat (limited to 'modules')
-rw-r--r--modules/bullet/space_bullet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index 97228a972f..d1fb5b01d6 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -924,11 +924,11 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f
btVector3 __rec(0, 0, 0);
RecoverResult r_recover_result;
- has_penetration = recover_from_penetration(p_body, body_transform, 0, p_infinite_inertia, __rec, &r_recover_result);
+ has_penetration = recover_from_penetration(p_body, body_transform, 1, p_infinite_inertia, __rec, &r_recover_result);
// Parse results
if (r_result) {
- B_TO_G(motion + initial_recover_motion, r_result->motion);
+ B_TO_G(motion + initial_recover_motion + __rec, r_result->motion);
if (has_penetration) {