melonJS icon indicating copy to clipboard operation
melonJS copied to clipboard

Animation created from atlas: misaligned hitbox

Open CodeAndWeb opened this issue 2 years ago • 1 comments

When an animated sprite is created with createAnimationFromName(), the hitboxes of the animation frames are misaligned:

animation-hitbox

When a sprite is created with atlas.createSpriteFromName() the alignment of the hitbox is OK.

To Reproduce

  1. git clone https://github.com/CodeAndWeb/melonjs-sprite-sheet-example.git
  2. npm run dev
  3. Press 's' to display debug panel
  4. Check 'hitbox' to display hitboxes

CodeAndWeb avatar Sep 12 '23 15:09 CodeAndWeb

that's weird ! Thank you for reporting this, I'll look into it as soon as possible 👍

obiot avatar Sep 13 '23 02:09 obiot