My Player is getting collided without and collision. Can not detect the problem. can you help?
private void OnControllerColliderHit(ControllerColliderHit hit)
{
if (hit.point.z > transform.position.z + playerController.radius)
{
GameOver();
Debug.Log(“Death on collision”);
}
}
private void GameOver()
{
isGameOver = true;
Debug.Log("Dead");
GetComponent<Score>().OnGameOver();
}
`
`