diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-02-20 17:28:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-20 17:28:31 +0100 |
commit | 6d0ec870e3bca69be3f103bfdfc0b1dd726ef97c (patch) | |
tree | 58322eabcbc347e55cbb3ba352477667139995f2 /modules | |
parent | 74ef11d404a3ae6f5c07638a6eb86cb2e4c572ef (diff) | |
parent | 6587024207c9c1d581e2440d1ad84df3648ec329 (diff) |
Merge pull request #26090 from aqnuep/ray_shape_fix2
Fix RayShape collision jitter when used with a RigidBody
Diffstat (limited to 'modules')
-rw-r--r-- | modules/bullet/godot_ray_world_algorithm.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/bullet/godot_ray_world_algorithm.cpp b/modules/bullet/godot_ray_world_algorithm.cpp index cadc8dd59e..3e06239453 100644 --- a/modules/bullet/godot_ray_world_algorithm.cpp +++ b/modules/bullet/godot_ray_world_algorithm.cpp @@ -100,8 +100,8 @@ void GodotRayWorldAlgorithm::processCollision(const btCollisionObjectWrapper *bo btScalar depth(ray_shape->getScaledLength() * (btResult.m_closestHitFraction - 1)); - if (depth >= -ray_shape->getMargin()) - depth *= 0.5; + if (depth >= -ray_shape->getMargin() * 0.5) + depth = 0; if (ray_shape->getSlipsOnSlope()) resultOut->addContactPoint(btResult.m_hitNormalWorld, btResult.m_hitPointWorld, depth); |