Esempio n. 1
0
    private void Update()
    {
        if (Input.GetMouseButton(1))
        {
            Vector3 dir = (character.transform.position - transform.position);
            character.ForceTurnTowards(new Vector3(dir.x, 0f, dir.z).normalized);
        }

        /*if (Input.GetKeyDown(KeyCode.Z)) {
         *  Cursor.lockState = Cursor.lockState == CursorLockMode.Locked ? CursorLockMode.None : CursorLockMode.Locked;
         * }*/
    }