1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-20 14:45:44 +00:00

Merge pull request #26090 from aqnuep/ray_shape_fix2

Fix RayShape collision jitter when used with a RigidBody
This commit is contained in:
Rémi Verschelde
2019-02-20 17:28:31 +01:00
committed by GitHub

View File

@@ -100,8 +100,8 @@ void GodotRayWorldAlgorithm::processCollision(const btCollisionObjectWrapper *bo
btScalar depth(ray_shape->getScaledLength() * (btResult.m_closestHitFraction - 1)); btScalar depth(ray_shape->getScaledLength() * (btResult.m_closestHitFraction - 1));
if (depth >= -ray_shape->getMargin()) if (depth >= -ray_shape->getMargin() * 0.5)
depth *= 0.5; depth = 0;
if (ray_shape->getSlipsOnSlope()) if (ray_shape->getSlipsOnSlope())
resultOut->addContactPoint(btResult.m_hitNormalWorld, btResult.m_hitPointWorld, depth); resultOut->addContactPoint(btResult.m_hitNormalWorld, btResult.m_hitPointWorld, depth);