Facing issues with sprites

Hello everyone,

I have a sprite-sheet of 30 images, which consist of run,duck and jump animation.

When I use duck animation, the animation plays properly but the collision boundaries remains the same and to avoid the collision with in-coming objects the collision boundaries should definitely get reduced.

But I am not getting how will I be able to do it.

I would like to know how will I be able to do it.

Every suggestions and advice is appreciated thanks for looking in above content.

Regards,

Swanand Thakur.

Physics bodies cannot be resized, so I can think of four options:

  1. (I don’t do this, but…) one approach is to have more than one body and enable/disable bodies as needed.

  2. Remove old body and add new body when changing animation.

  3. Choose a body shape that works approximately well enough for all bound requirements.

  4. Use a multi-part body and more complex collision listener to choose when to ignore or pay attention to collisions.

Physics bodies cannot be resized.

Sir @roaminggamer,

I have used the second method and it has worked well for me.

Thanks and Regards,

Swanand Thakur.

Physics bodies cannot be resized, so I can think of four options:

  1. (I don’t do this, but…) one approach is to have more than one body and enable/disable bodies as needed.

  2. Remove old body and add new body when changing animation.

  3. Choose a body shape that works approximately well enough for all bound requirements.

  4. Use a multi-part body and more complex collision listener to choose when to ignore or pay attention to collisions.

Physics bodies cannot be resized.

Sir @roaminggamer,

I have used the second method and it has worked well for me.

Thanks and Regards,

Swanand Thakur.