移动
This commit is contained in:
parent
93ec2f5d86
commit
b50088ffdf
@ -98,7 +98,7 @@ public class RecuseNpc : MonoBehaviour
|
||||
float dis = Vector3.Distance(transform.position, currentTarget);
|
||||
|
||||
// 停止条件改为 NavMeshAgent.stoppingDistance
|
||||
if (movebool && dis <= navMeshAgent.stoppingDistance)
|
||||
if (movebool && dis <= 0.2f)
|
||||
{
|
||||
Debug.Log("到达目标点");
|
||||
nstate = Npcstate.idle;
|
||||
@ -113,6 +113,10 @@ public class RecuseNpc : MonoBehaviour
|
||||
targetPoints.Clear();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user