路径测试2

This commit is contained in:
杨号敬 2024-12-16 14:14:25 +08:00
parent a3e794dd82
commit 7632a3f057

View File

@ -100,7 +100,7 @@ public class RecuseNpc : MonoBehaviour
tar = hit.position; // 将目标点调整到最近的导航网格位置
}
Debug.Log("进入奔跑++++++=");
targetPoints.Clear();
//targetPoints.Clear();
targetPoints.Add(tar);
@ -128,7 +128,7 @@ public class RecuseNpc : MonoBehaviour
if (targetPoints.Count > 0 && currentTarget != null)
{
currentTarget = targetPoints[0];
currentTarget = targetPoints[targetPoints.Count-1];
nstate = Npcstate.run;
movebool = true;