//set goals //threadsafe public void SetGoalMoveHere(Vector3 start, Vector3 destination, bool snapToNavMesh = false, bool applyRaycast = false) { if (_canRecieveGoals == false) { return; } if (!properties.doNavMesh) { Debug.LogWarning("you trying to get path when you dont even set properties to generate NavMesh"); return; } if (properties == null) { Debug.LogError("Agent dont have assigned Properties"); return; } lock (this) if (canSendPathRequest == false) { return; } //this.destination = destination; PathFinder.GetPath(this, destination, start, snapToNavMesh, null, applyRaycast); }
public void SetGoalMoveHere(Vector3 start, Vector3 destination, bool snapToNavMesh = false, bool applyRaycastBeforeFunnel = false, int maxRaycastIterations = 100) { if (_canRecieveGoals == false) { return; } if (!properties.doNavMesh) { Debug.LogWarning("you trying to get path when you dont even set properties to generate NavMesh"); return; } PathFinder.GetPath(this, destination, start, snapToNavMesh, null, applyRaycastBeforeFunnel, maxRaycastIterations); }