Search Issue Tracker
Fixed
Fixed in 6000.0.66f1, 6000.3.4f1, 6000.4.0b4, 6000.5.0a1, 6000.5.0a5
Votes
18
Found in
2021.3.46f1
2022.3.53f1
6000.0.28f1
6000.1.0a6
6000.2.0a1
6000.3.0a1
6000.4.0a1
6000.5.0a1
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
Comments (2)
-
zalogic
Dec 13, 2024 12:12
New extra info: the SphereCast fails or returns incorrect hit point with the CharacterController collider on Unity 6000.0.31 LTS.
100% repro rate.
It's not related to SphereCast on CapsuleColllider, it's with the CharacterController collider. -
zalogic
Dec 11, 2024 17:35
Apparently physics spherecast misses capsule collider with the upper or lower part even when not at the so called "default" position. At various other scene positions a capsule collider is missed by physics sphere casts at random times when targeted at different positions on it's surface from a fixed position.
Happens on Unity 6000.0.30f1 LTS.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Multiple "[...] is inaccessible due to its protection level" errors are thrown when opening project with Unity Version Control installed
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Sorting icons are tiny and misaligned in Import Activity window
- The Undo system does not record HideFlags.HideInHierarchy changes
Resolution Note (fix version 6000.5.0a5):
Fixed in 6000.5.0a5
Resolution Note (fix version 6000.4.0b4):
Fixed in 6000.4.0b4
Resolution Note (fix version 6000.3.4f1):
Fixed in 6000.3.4f1
Resolution Note (fix version 6000.0.66f1):
Fixed in 6000.0.66f1