Пример #1
0
    public Vector3 GetWaypointPosition()
    {
        Vector3 localPos  = pathMagic.waypoints[pathMagic.GetCurrentWaypoint() + 1].position;
        Vector3 globalPos = transform.position + localPos;

        return(globalPos);
    }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     Debug.Log(magic.GetCurrentWaypoint());
     magic.waypoints[0].position.x = 0;
 }