Merge pull request #26090 from aqnuep/ray_shape_fix2
Fix RayShape collision jitter when used with a RigidBody
This commit is contained in:
commit
6d0ec870e3
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue