I have a tunnel that the player is supposed to go down and avoid holes. The player object only moves on the Z-Axis, to move left and right, the player rotates the whole tunnel. To check if the player hits a whole, I have simple script that sends a raycast down, and if it does not hit anything, it ends the game. It works, until the player turns the tunnel too fast. I have a debug ray showing that the raycast is hitting the collider. Any idea what would cause this?
Debug.DrawRay(transform.position, Vector3.down, Color.green);
var hit : RaycastHit;
if(!Physics.Raycast(transform.position, Vector3.down, hit)){
Keeper.end = true;
}