private void OnPathRequestSucceeded(IPathRequestQuery request) { Vector3[] roughPath = request.GetSolutionPath(m_pathAgent.PathManager.PathTerrain); Vector3[] steeringPath = roughPath; #if PathSmoothing if (m_usePathSmoothing) { // Smooth the path Vector3[] aLeftPortalEndPts; Vector3[] aRightPortalEndPts; m_pathAgent.PathManager.PathTerrain.ComputePortalsForPathSmoothing(roughPath, out aLeftPortalEndPts, out aRightPortalEndPts); steeringPath = PathSmoother.Smooth(roughPath, request.GetStartPos(), request.GetGoalPos(), aLeftPortalEndPts, aRightPortalEndPts); } #endif // Begin steering along this path m_steeringAgent.SteerAlongPath(steeringPath, m_pathAgent.PathManager.PathTerrain); }
private void OnPathRequestSucceeded(IPathRequestQuery request) { Vector3[] roughPath = request.GetSolutionPath(m_pathAgent.PathManager.PathTerrain); m_steeringAgent.SteerAlongPath(roughPath, PathTerrain); }