Bacon2D/Bacon2D

horizontalMirror and single frame SpriteAnimations

yoktobit opened this issue · 1 comments

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'll try to investigate this issue this week (little busy here). Thank you for reporting this!