Quote:
Originally Posted by DustyPorViva
It depends on where you want the 'center' of the player. The x is always player.x+1.5, but the y, I usually prefer it in the center of the body, not the whole player.
The 'size' of the player is 3x3, this is shown in Graalshop by the 48x48 pixel box. Now, if you mean the center of that, then it's player.x+1.5 and playery+1.5, but I prefer player.x+1.5 and playery+2(or 2.5), which is near the center of the player's body.
|
So if you wanted the exact center of a player.
Center X - player.x + 1.5
Center Y - player.y + 2
Because I want the center of the body.