public void SetInitialWp(Waypoint wp, Vector3 forward, bool doRandomMotion) { currentWaypoint = wp; transform.forward = forward; if (doRandomMotion) { NavigateRandomly(); } controller = GetComponent <WaypointNavigatorController>(); controller.SetDestination(wp.GetPosition()); }
// Start is called before the first frame update void Start() { controller = GetComponent <WaypointNavigatorController>(); }