Unity Issue Tracker - Raycast does not detect hit with the Character Controller Collider when casting it towards the Camera which is inside the Collider
Closed
UUM-47055
Raycast does not detect hit with the Character Controller Collider when casting it towards the Camera which is inside the Collider
Unity: 3D Physics
Won't Fix
2023.3.X
2023.2.X
2023.1.X
2022.3.X
2021.3.X
Raycast does detect hits with the Character Controller Collider.
Making the character controller collider with Radius: 0.5 and Height: 3, triggers the action.
Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/Scenes/SampleScene.unity” scene
3. Enter the Play Mode
4. Walk in front of the NPC, so that you enter his field of vision
5. Observe the Console
Expected result: Raycasts detect hits with the Character Controller Collider (“Raycast has hit Player” log message appears in the Console)
Actual result: Raycasts does not detect hits with the Character Controller Collider (“Raycast has hit <GameObject behind the Player>” log message appears in the Console)