本文共 389 字,大约阅读时间需要 1 分钟。
由于NavMeshAgent组件的加速度Acceleration太高,自动导航到目的地的转角太多,或者角度太小,导致自动导航的时候,
无法到达路径,或者在路径的地方不停徘徊,改变agent.acceleration即可。
...if(agent.hasPath){ Vector3 toTarget = agent.steeringTarget - this.transform.position; float turnAngle = Vector3.Angle(this.transform.forward,toTarget); agent.acceleration = turnAngle * agnet.speed;//Unity NavMesh Area Costs and Agent Speeds Part 2}...
相关资料:
1.
2.
3.
转载地址:http://bqkdz.baihongyu.com/