Search Issue Tracker

Duplicate

Votes

0

Found in

5.1.1f1

Issue ID

707472

Regression

No

CapsuleCastAll has issues when the start of the sweep is intersecting with a collider

Physics

-

How to reproduce:

1. Open attached project
2. Open scene TestScene.unity
- The capsule casts in the scene represent character jump arcs.
- The platform is one way, you can jump up through it but you don't fall down through it (if the capsule sweep starts completely above the platform). To achieve this, the collision mask for the CapsuleCast is set differently if the Y velocity is positive or negative.
- The blue capsule shows each sweep that makes up the jump arc.
- A green capsule shows a valid collision.
- A red capsule shows an incorrectly calculated collision.
3. Try moving the CapsuleCastBug gameobject around the scene
- Note how the capsule turns red when the start of a sweep intersects a collider (or when RayCastHit.distance is zero)
- Workaround: ignore collisions where RayCastHit.distance is zero

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.