Search Issue Tracker
Raycasting to and from a Character Controller doesn't hit intended target
Steps to reproduce:
1. Open my attached project inside "case_806527 Raycastproblem" file.
2. Select "Test Broken - Camera too high" scene.
3. Press play button in toolbar.
--- There are two raycasts. One comes from "FPCamera" object and another from "Capsule" object which is always directed into "FPCamera" object.
4. Open console.
--- "Capsule" object Raycast should hit "FPSController" object (because "FPCamera" object is inside of "FPSController" object) and show it on console window but it doesn't.
5. Press play button again.
6. Select "Test Works - Camera lower" scene.
7. Press play button in toolbar.
--- "FPCamera" camera object in this scene is 0.05 lower in Y axis than in previous scene.
8. Open console.
--- "Capsule" object Raycast hits "FPController" object and now console shows this detection.
Reproduced in: 5.4.0b23, 5.3.5p3, 5.3.1f1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [2020.3] Play Mode has visual artifacts when Graphics API is set to DirectX12 with Dynamic Resolution enabled
- White texture appears when setting “RenderTextureFormat.Depth” to “RenderTexture” on the Camera
- Cursor is visible when using “Cursor.lockState = CursorLockMode.Locked” and “Cursor.visible = false”
- Material.SetOverrideTag setting LightMode tag has no effect
- Decal is not rendered when in Camera component Culling Mask dropdown field Default is unselected