0 Favourites

[r61] Animation stretch from crop all

  • C2 r61; Windows 7 32 bit; FireFox 7.0; GeForce 9400 GT

    Core 2 Duo E8400 3.00 GHz; 3,00 GB RAM

    First:

    • created 2 animations
    • imported PNG frames
    • created events

    Resulting in this capx:

    http://dl.dropbox.com/u/7871870/construct/c2-bug-test-01.capx

    If you run the preview and press 'Spacebar' everything happens as expected: the animation "hit" is played and when finished restored to "Default".

    Then:

    • close the preview
    • open the Sprite in the picture editor
    • for each animation of Sprite hold 'Shift' and click 'crop' to crop all frames

    If you run the preview again, every time 'Spacebar' is pressed the sprite is stretched horizontally when the animation change.

    This is what was expected:

    <img src="http://dl.dropbox.com/u/7871870/construct/bug-01-01.jpg" border="0">

    This is what I get after pressing 'Spacebar' a few times:

    <img src="http://dl.dropbox.com/u/7871870/construct/bug-01-02.jpg" border="0">

    If I continue to press 'Spacebar' the Sprite stretches to infinite.

  • I'm not sure if this is a bug.

    The frames are originally 256x256, but after cropping, they are no longer uniform. You then need to amend the collision box, and apply to all frames, and as they are not a uniform size, the image point origin would need to be amended (I set it to bottom left corner). After that, it looked fine.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Oops, you're right: using Set Animation in an 'On animation finished' event doesn't work properly. I've fixed it for the next build.

    Note in the next build it still will freeze if you hold down space - it's because 'space is down' is true every tick while space is down, so you're constantly setting the animation. Change it to 'on space pressed' and it will work OK in the next build.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)