Search Issue Tracker

Active

Votes

0

Found in

2021.3.46f1

2022.3.53f1

6000.0.28f1

6000.1.0a6

Issue ID

UUM-88080

Regression

No

Physics.Raycast fails when a Capsule Collider at a default position is used

--

-

Reproduction steps:
1. Open the attached “BrokenCapsule.zip” project
2. Open the “BrokenRaycast” Scene
3. Enter the Play mode
4. Observe the Raycast lines in the Scene view

Expected result: The lines are green and text “Hit” is visible above the capsule
Actual result: The lines are red and text “Miss” is visible above the capsule

Reproducible with: 2021.3.46f1, 2022.3.53f1, 6000.0.28f1, 6000.1.0a6

Reproducible on: Windows 10 (User reported), Windows 11
Not reproducible on: no other environment tested

Notes:
- Also reproduces in the Player
- Only reproduces when the capsule is in default position. The problem disappears when the capsule is rotated on X or Z axis or its position is changed
- Moving the ray's origin backwards along its direction and increasing its Raycast length does not change the result. Moving the origin otherwise or changing the ray direction does make the Raycast a correct hit
- Extending the rays further will create a hit when they reach the back face of the capsule
- When extending the length of these rays that miss, they all intersect the edge between the cylinder and bottom hemisphere
- Relevant discussions page: [https://discussions.unity.com/t/recreatable-incorrect-raycast-miss-on-capsule-collider/1556381/8|https://discussions.unity.com/t/recreatable-incorrect-raycast-miss-on-capsule-collider/1556381/8|smart-link]

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.