- Home /
Smooth movement between two exact locations
Hi!
What I am trying to do may sound complicated, but lets try
what I would like to achieve is movement of player between current position, and "next position", point in front of him. (3d location, not 2d)
So when he presses W, he moves to "tile" in front of him. The world would be split in tiles, so as you can see in the image, I would like the movement be, after pressing W, from one centroid of tile, to second, I want the movement be smooth, no "teleport".
Important thing to note, even when I stop the key press "W" in the middle of movement, it will finish in the next "T1" centroid, AND, if I keep my key pressed during the movement and it reaches "T1", it will immediately continue to next tile "T2".
Tried Slerp, Lerp, MoveTowards. cant make it work, sometime it does not work at all, sometime I have to keep pressing the key so it moves to the desired location etc.
Note: the player is "ball", so ideally, the ball would rotate like it would normally when moving
Your answer
![](https://koobas.hobune.stream/wayback/20220612150340im_/https://answers.unity.com/themes/thub/images/avi.jpg)