Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

My guess is that you are calculating which tile you are on and selecting the next tile (from the behaviour) so you take your x and your y, divide by tile width or height and add 1 full tile (or take one if looking up or left)… Maybe I am just wild guessing, but that sounds like it… and I think your control point for the sprite is in the center, not one corner.

One think you could try is check against the corner that is opposite to the movement direction and that will make you be halfway into the tile before jumping into the next (well check 1 px off the exact corner or you will hit your current tile when fully tile aligned), That’s what came to my mind when I wrote the comment. Not sure if that will help/fix your issue though.