No animation on player movement 3d

I am working on a 3d game and I want to create slot movement system where player can move on left, midle and right side, It’s working fine but the problem is with my code player is just “teleported” to desired position, no animation at all.
My code is:

transform.position += new Vector3(-1.31f,0,0);

My question is: How can I achieve smooth movement animation?

I am guessing you need to use LERP.

This article might help:

Or google it and you should find some examples to help you out.

1 Like

Yeah, LERP Is what I need, thanks!