Sprite animation problem

Godot Version

4.3

Question

I have problem with animating spritesheet. When I start the game and move player up and down I have this weird effect:

When I start to move other direction it stops and when I start to move up and down it doesn’t appear. But from time to time I can see frame or few with this line above my character.
I checked and it is a line from row above from the spritesheet. I checked spritesheet, all sprites are contain in 16x16 cells. I don’t understand what I do wrong.

Here’s my Player scene:
obraz

This appears because cell size is incorrect or there is offset. Also for animation I recommend using AnimatedSprite2D.

As I wrote in the question, the cell size is 16x16 and all sprites are inside the cells. The spritesheet is 128x144. I experimented with 16x18 sprites where I added 2 extra pixels above each sprite, the problem remained.
There is offset on the sprite position, but it doesn’t affect the animation.

Edit:
You are right, cell size was incorrect. 16x16 is too small, I changed it to 24x24 and then put the sprite in the center (without changing sprire size).
Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.