Пример #1
0
 public PathPlanParams(Vector3 startPos, INavTarget target, float replanInterval)
 {
     System.Diagnostics.Debug.Assert(replanInterval > 0.0f);
     m_startPos       = startPos;
     m_target         = target;
     m_goalPos        = target.GetNavTargetPosition();
     m_replanInterval = replanInterval;
 }
Пример #2
0
 public PathPlanParams(Vector3 startPos, INavTarget target, float replanInterval)
 {
     System.Diagnostics.Debug.Assert(replanInterval > 0.0f);
     m_startPos = startPos;
     m_target = target;
     m_goalPos = target.GetNavTargetPosition();
     m_replanInterval = replanInterval;
 }
Пример #3
0
 /// <summary>
 ///Paths are replanned. When they are replanned, we need to recompute the new start and goal position of the path,
 ///since the world has changed since the path was last planned. This function handles recomputing those values.
 /// </summary>
 /// <param name="newStartPos">
 ///The new start position of the path plan (likely the agent's current position)
 /// </param>
 public void UpdateStartAndGoalPos(Vector3 newStartPos)
 {
     m_startPos = newStartPos;
     m_goalPos  = m_target.GetNavTargetPosition();
 }