I've noticed a funny quirk of the grid-based movement system.
To move my player between levels I find the X/Y position of the origin of the sprite where I want to move the player to (warpTo sprite) and then set the player's X/Y to inherit these values. The two sprites are the same size (16x16) and have their origin point in the same position (0,16) so the player should end up in that exact location.
What ends up happening is the player appears a few pixels below this point. Sometimes even on partial pixels (y:26.777)
If I disable grid-based movement this doesn't happen.
If I increase the player's grid-based movement speed, the issue worsens (they end up 10+ pixels past the point I sent them to)
This made me think maybe the player was still moving after being sent to the new position but even when I wait for the player to stop moving (not isMoving) before sending them, I get the same issue.
Any thoughts on what might be happening?
Thanks!