I’m generating a navmesh with a plane mesh and moving my player using
agentGoto(), but the player model won’t decelerate quickly enough and ends up “sliding” to the destination. I’ve tried increasing the acceleration to a high number, which achieves the affect of constant speed up until the player starts to decelerate and starts “sliding” into the destination point.
I’ve also tried teleporting the agent when it gets extremely close to the destination point, but that is sometimes jarring and the player will never reach the edge of the navmesh. I noticed there are getter methods for the crowd agent’s velocity, acceleration, etc., but cannot find a way to manually set these/set a deceleration constant.
I was wondering if there was an auto-braking hook or potentially other solutions to fixing this.
Here’s a playground: https://playground.babylonjs.com/#WYM1JD#1