Hello,
We have an issue in a game we just released:
After a random time and under random circumstances our main raycasting stops getting any hits.
Therefore players cannot interact with objects and are forced to reload the game.
It’s 40% of all the bug reports we get.
No one has found a way to reproduce it and we only caught it once in the editor.
The ray is correct, the collider is there (it blocks movement), but raycast is getting zero hits.
In the situation caught in the editor the only thing that fixed the issue was removing Rigidbody and adding it again. It doesn’t seem to affect objects without a rigidbody.
We are using Unity 2019.4.19f1 LTS and the method Physics.RaycastAll (2 units distance, 3 layers in layermask).
“Remove all rigidbodies and restore them” at some interval doesn’t seem like a sensible option. Any ideas how to approach it?