void OnCollisionEnter(Collision collision) { if (collision.gameObject.CompareTag("Obstacle")) { move.enabled = false; } } }