Navigation mesh bug? Video included

I’ve just run an official example from here: Creating A Navigation Mesh | Babylon.js Documentation
What does it rotate so many times?
How can it be fixed? I think it’s not the best experience for players if my AI bots will walk like that :grinning:

Looks there’s no such problem here: https://playground.babylonjs.com/#X5XCVT#240 (took from here: Crowd Agents | Babylon.js Documentation )

No it is not navigation mesh bug.

The orientation update is done in javascript side in scene.onBeforeRenderObservable.add(). I guess it is a basic illustration of how to rotate based on the velocity. You can implement a different rotation based on your need in javascript.

The other PG doesn’t implement rotation, so the cubes always face the same direction.

1 Like

change 129 line
ag.mesh.rotation.y = ag.mesh.rotation.y + (desiredRotation - ag.mesh.rotation.y)
delete : * 0.05
It breaks agent’s -2PI ~ 2PI rotation length of sequential rise

2 Likes