Move character to the point smoothly

I want the character to move to the point. After clicking the mouse clicks, I get the position coordinate
At first I used this way:

player.lookAt(endPoint);
Animation.CreateAndStartAnimation(“anim”, player, “position”, 30, time, player.position, endPoint, Animation.ANIMATIONLOOPMODE_CONSTANT);

But it will not hit the wall after add the collision,How to correctly collide and move smoothly to the endPoint?

Please provide us with a Playground repro.

https://www.babylonjs-playground.com/#1JVKW2#9 - just move
https://www.babylonjs-playground.com/#1JPHAD#1 - move & rotate
https://www.babylonjs-playground.com/#184SZL#4 - move, rotate & collisions

More examples Playground search page | Babylon.js Documentation

3 Likes

thanks!