fix: Adjust player sprite rendering and collision box for proper scaling and alignment

This commit is contained in:
Kacper Kostka (aider)
2025-04-05 18:23:38 +02:00
parent 84e08b397d
commit f592c74412
2 changed files with 14 additions and 13 deletions

View File

@@ -102,8 +102,8 @@ function spawnPlayer() {
PIXEL_SIZE = 6;
// Create player at specified coordinates
// Adjust Y position to account for larger sprite size
player = createEntity(ENTITY_TYPES.PLAYER, 229, 55);
// Position adjusted for proper sprite alignment
player = createEntity(ENTITY_TYPES.PLAYER, 229, 50);
// Focus camera on player
worldOffsetX = player.x - (canvas.width / PIXEL_SIZE / 2);