So this seems like a simple idea. I have a tile based design, and I need to move my player in increments of 64px. But I'd like it to be a smooth transition. I thought about using lerp for this, but couldn't figure out what to do. Could someone help me out?
There's an example of smooth grid movement in the FAQ. Have a look there first, see if it's what you're looking for.
Develop games in your browser. Powerful, performant & highly capable.
You could either use a plugin like Lerp, or you could use something like this:
Every Tick --> While Player.Moving --> Player.x + (64 * dt)
Every tick/fraction of a second, you can check for a player's moving boolean and move the x value however much you want (the dt is for framerate independency) and then check for when the player reaches his next tile destination to stop his movement.
I�m using the moveto behavior:
My game have the same 'system', tile based with 64px and I'm 'move at angle' to make it runs smoothly 64px ahead.
How are you guys handling collision?