I'm talking about where if you press a directional key once you walk over to the adjacent tile and can't do any other actions during the walk. I can get my character to move one tile width, but my trouble is animating the walk and having the character actually walk to the next tile, rather than teleport. The research I've done has pointed me in the direction of interpolation, but I don't really understand how to get it working.
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
The easiest way is to use linear interpolation (AKA lerp) over time. Let's say you want you character to move from
This movement might feel a bit mechanical but that's a good first step, if you want to go further, look into easing functions: |
|||||||
|