Exemplo n.º 1
0
    private void Start()
    {
        Agent      = GetComponentInChildren <NavMeshAgent>();
        Controller = GetComponent <Demo_ThirdPersonController>();

        Agent.updateRotation = false;
        Agent.updatePosition = true;
    }
    private void Start()
    {
        if (UnityEngine.Camera.main != null)
        {
            Camera = UnityEngine.Camera.main.transform;
        }
        else
        {
            Debug.LogWarning("Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls.");
        }

        Character = GetComponent <Demo_ThirdPersonController>();
    }