Animation problem (character's feet leave the ground during the animation)

Hi everyone,

I’m facing a problem in the development of a game. There are some animations that should be still, but they are not. I don’t know why, but they do a slight movement in the y-axis direction.

Please see the videos below to check the problem and note that the character’s feet leave the ground during the animation.

BTW I’m using the Texture Packer to create all image strips.

Can anyone help me? [import]uid: 33302 topic_id: 13004 reply_id: 313004[/import]

I can’t answer your question but I do love the character and art. Can’t wait to see the game! [import]uid: 22392 topic_id: 13004 reply_id: 47755[/import]

Are you running the latest daily build? Looks like a pre 526 bug. [import]uid: 27183 topic_id: 13004 reply_id: 47757[/import]

I think the problem is your images, I had the same problem a while ago and it appeared that the images were in different sizes (Height). it was just a few pixels but it made the same behavior as yours, it had happened while I was trimming off transparent space around the images.

[import]uid: 13560 topic_id: 13004 reply_id: 47761[/import]

Looks to me like the sprite changes a bit in size during the animation - and when it’s larger, it simply takes up more space above, and more space below. So it’s changing size around its center.

I’ll bet it’s a problem with how the sprite is packed - texture packer is actually trying to center it inside the “sprite frame”. So when it’s bigger, it moves up and down a bit. You’ll want to make sure that in every frame the feet are the same distance from the bottom.

And great looking art! [import]uid: 49372 topic_id: 13004 reply_id: 47762[/import]

Hi everyone,

Thanks for your feedback and your nice comments about the art too! :wink:

  • Don: I’m going to download the latest build and check if the problem still occurs.

  • lano78: I’ve already checked the size of the images. They all have the same size. Anyway, I’ll check again if the Texture Packer is exporting it correctly.

  • s2alexan: We are currently using the following code to set the reference point (see below). So, the change in image size shouldn’t impact in the bottom of the animation.
    [lua]object:setReferencePoint(display.BottomCenterReferencePoint)[/lua]

I’m going to try the mentioned solutions and as soon as possible I’ll send a feedback.

Thanks! [import]uid: 33302 topic_id: 13004 reply_id: 47863[/import]

Hi Everyone,

I’ve tried everything, but nothing works! Let me explain what I have done.

  1. I’ve downloaded the latest build. Nothing has changed.

  2. I’ve tried to use image strips with and without trim. Without trim the animation’s displacement looks smaller, but the problem remains.

  3. I’ve generated a new image strip using another tool and I loaded it in the game using the sprite.newSpriteSheet() instead of sprite.newSpriteSheetFromData(). It looks like the Corona is not ‘cutting’ the frames correctly. And once again nothing has changed.

Unfortunately the problem remains unresolved. :frowning: Does anyone have any more ideas?
[import]uid: 33302 topic_id: 13004 reply_id: 47890[/import]