Beispiel #1
0
    public void GoToEnnemi()
    {
        Vector3 v = Target.transform.position - me.transform.position;

        v.y = 0;
        if (v.magnitude > 5.0f)
        {
            if (nav != null)
            {
                v = nav.Navigate(me.transform, v);                 // Use gradient navigation if possible
            }
            me.Move(v);
        }
    }