After our game has been running for a little while, every call to Physics.Raycast returns false for a little while. The problem comes and goes. Raycasts may stop working for a couple seconds, work again for 30 seconds, and then fail again. We’re in a panic getting ready for a demo and aren’t sure how to track this down.
When the problem happens, all raycasts in the game fail. User interface (NGUI) raycasts. Raycasts from the camera that we use to pick game objects. Even a fixed raycast that we perform every frame into an object that never moves. They all return false. We can pause the game and check that the objects we expect to hit still exist, are enabled, and have an enabled MeshCollider attached.
Any ideas of what we could be doing to cause this or how to narrow the problem down?