R
RisingKane
Guest
Hi everyone.
I'm trying to make some movement/animation, but I'm having some trouble.
Let's say I have a 32x32 grid. What I'd like to achieve is to move the player object tile by tile (32 pixels each). I managed to do that by setting the player's speed to 32, but it moves instantly to the next tile. I'd like the player object to move gradually until he/she reaches the center of the next tile. It could be pixel by pixel, maybe more.
I'm not using external buttons to move the player (mouse, keyboard). I have four in-game buttons (UP, DOWN, LEFT, RIGHT). When they're clicked, the player moves accordingly to which button was clicked.
Thanks!
I'm trying to make some movement/animation, but I'm having some trouble.
Let's say I have a 32x32 grid. What I'd like to achieve is to move the player object tile by tile (32 pixels each). I managed to do that by setting the player's speed to 32, but it moves instantly to the next tile. I'd like the player object to move gradually until he/she reaches the center of the next tile. It could be pixel by pixel, maybe more.
I'm not using external buttons to move the player (mouse, keyboard). I have four in-game buttons (UP, DOWN, LEFT, RIGHT). When they're clicked, the player moves accordingly to which button was clicked.
Thanks!