public static SteeringOutput GetSteering(KinematicState ownKS, SIntercept info) { if (info.m_targetLinearVelocity == null) { return(NULL_STEERING); } float l_predictedTimeToTarget = (info.m_target.position - ownKS.m_position).magnitude / ownKS.m_linearVelocity.magnitude; l_predictedTimeToTarget = MathExtent.Clip(l_predictedTimeToTarget, info.m_maxPredictionTime); SURROGATE_TARGET.position = info.m_target.position + (info.m_targetLinearVelocity * l_predictedTimeToTarget); return(Seek.GetSteering(ownKS, SURROGATE_TARGET)); }
public void SetInfo(SIntercept info) { m_info = info; }