horizontalMirror and single frame SpriteAnimations #112

Open
opened 2015-04-08 21:11:05 +00:00 by yoktobit · 1 comment
yoktobit commented 2015-04-08 21:11:05 +00:00 (Migrated from github.com)

Hi, I'm trying to transition between "walking" and "idle" SpriteAnimations of my player character. However, if I change the animation property to "walking" and horizontalMirror to true when moving right and afterwards switch the animation property of my sprite back to "idle" when stopping, the horizontalMirror gets lost if my idle animation has just 1 frame so that my character is facing left. So whenever I stop moving my character it's always facing left, even after moving right before. When using a 2 frame idle animation it works normally and my character still looks to the right after stopping (this is my workaround atm). I tried to debug that myself and had no success. The strange point is that horizontalMirror and m_horizontal seem to have correct values (true and -1). But the idle animation is facing left and I even don't get to a breakpoint that is set to the paint method of the spritesheet then. So I'm confused what is drawing the unscaled pixmap then?! I made a sample project here to show the effect:
https://github.com/yoktobit/bacon2dhm/blob/master/main.qml
The pro file includes the static version of Bacon2D at the parent dir of the project, so compiling without a few changes to the dirs won't work.

Hi, I'm trying to transition between "walking" and "idle" SpriteAnimations of my player character. However, if I change the animation property to "walking" and horizontalMirror to true when moving right and afterwards switch the animation property of my sprite back to "idle" when stopping, the horizontalMirror gets lost if my idle animation has just 1 frame so that my character is facing left. So whenever I stop moving my character it's always facing left, even after moving right before. When using a 2 frame idle animation it works normally and my character still looks to the right after stopping (this is my workaround atm). I tried to debug that myself and had no success. The strange point is that horizontalMirror and m_horizontal seem to have correct values (true and -1). But the idle animation is facing left and I even don't get to a breakpoint that is set to the paint method of the spritesheet then. So I'm confused what is drawing the unscaled pixmap then?! I made a sample project here to show the effect: https://github.com/yoktobit/bacon2dhm/blob/master/main.qml The pro file includes the static version of Bacon2D at the parent dir of the project, so compiling without a few changes to the dirs won't work.
mdkcore0 commented 2015-04-13 12:38:12 +00:00 (Migrated from github.com)

Hi, I'll try to investigate this issue this week (little busy here). Thank you for reporting this!

Hi, I'll try to investigate this issue this week (little busy here). Thank you for reporting this!
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mdkcore/Bacon2D#112
No description provided.