コード例 #1
0
        public static SteeringOutput GetSteering(KinematicState ownKS, SPathFollowing info)
        {
            if (info.m_currentWaypointIndex >= info.m_path.Count)
            {
                return(NULL_STEERING);
            }

            if (Vector3.Distance(info.m_path[info.m_currentWaypointIndex].position, ownKS.m_position) <= info.m_closeEnoughRadius)
            {
                info.m_currentWaypointIndex++;
            }

            if (info.m_currentWaypointIndex == info.m_path.Count)
            {
                return(NULL_STEERING);
            }

            SURROGATE_TARGET.position = info.m_path[info.m_currentWaypointIndex].position;

            return(Seek.GetSteering(ownKS, SURROGATE_TARGET));
        }
コード例 #2
0
 public void SetInfo(SPathFollowing info)
 {
     m_info = info;
 }