基于unity3d 2019.4.13
NavMeshAgent的寻路由acceleration和speed两个值决定,寻路过程中的速度为velocity。调用isStop=True并不能立马打断移动,会根据acceleration来逐步减速,想要立刻停止,需要:
navmeshAgent.isStopped = True;
navmeshAgent.velocity = Vector3.zeor;
基于unity3d 2019.4.13
NavMeshAgent的寻路由acceleration和speed两个值决定,寻路过程中的速度为velocity。调用isStop=True并不能立马打断移动,会根据acceleration来逐步减速,想要立刻停止,需要:
navmeshAgent.isStopped = True;
navmeshAgent.velocity = Vector3.zeor;