Hi,
I have problem with dimensions of loaded spritesheet. Please take a look at live example: http://to.phpworkstation.com/
Knight animation is corrupted You can see blinking area on the left corner, sword on the first frame is also corrupted. Image size is 68x17 (with 4 frames so each frame is 17x17):
Thanks for your reply. Watch my “video” showing 3 problems: knight bonus pixel in animaton, player corrupted animation when swimming right, strange lines after go out the water:
Hi,
The problem comes from your assets, a spritesheet or atlas always have a few transparent pixels between each frame.
I resized your character’s spritesheet to 72x20 and added 1 pixel transparency in each side(artists usually add more transparency), so change this line: this.load.spritesheet('player', '/player-male.png', { frameWidth: 12, frameHeight: 20 });