예제 #1
0
    private void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.CompareTag("Ground"))
        {
            score = transform.position.z - controlPoint.z;
            rigidbody.velocity    = new Vector3(0f, 0f, 0f);
            transform.rotation    = Quaternion.RotateTowards(transform.rotation, Quaternion.Euler(0, 0, 0), fixRate);
            rigidbody.isKinematic = true;
            isFlying = false;
            finish.FinishGame();

            Debug.Log("player: " + (int)score);
        }
    }