[r61] Animation stretch from crop all

Bugs will be moved here once resolved.

Post » Tue Oct 11, 2011 5:08 am

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:


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



If I continue to press 'Spacebar' the Sprite stretches to infinite.Animmaniac2011-10-11 05:11:36
Scirra Employee
B
129
S
45
G
15
Posts: 705
Reputation: 15,413

Post » Tue Oct 11, 2011 8:52 am

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.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,844
Reputation: 48,289

Post » Tue Oct 11, 2011 1:58 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests