Quote:
Originally Posted by Crow
That box approach is nice, I think I will give that a try in the future.
Edit: I think when rounding the coordinates, though, you are better off using shared.roundto(), and rounding towards 1/16:
PHP Code:
player.x = shared.roundto(player.x, 1 / 16);
player.y = shared.roundto(player.y, 1 / 16);
|
I had tried rounding to the nearest pixel. However, it doesn't really matter. Rounding to the speed of the player's sliding speed will align them just as properly when sliding around
