npc移动逻辑

This commit is contained in:
huyulong 2024-12-13 19:23:39 +08:00
parent 7e7c986885
commit 4ca91767bb

View File

@ -112,7 +112,7 @@ public class RecuseNpc : MonoBehaviour
movebool = true; movebool = true;
float dis = Vector3.Distance(this.transform.position, currentTarget); float dis = Vector3.Distance(this.transform.position, currentTarget);
// 判断是否到达目标点 // 判断是否到达目标点
if (movebool && dis < 0.1) if (movebool && dis < 0.1f)
{ {
Debug.Log("到达目标点"); Debug.Log("到达目标点");