azerion / phaser-spine

A plugin for Phaser 2 that adds Spine support
MIT License
121 stars 58 forks source link

Possible fix for incorrect scalex/scaley animations #50

Closed AleBles closed 7 years ago

shibekin69 commented 7 years ago

I'm not sure if it worked (it doesn't seem to). For some reason, even if one of the axis is not being scaled, it's being affected.

scaledebug.zip

I've made a test file: 8-way flower-petal like arrows on 4 quadrants around the root at 0,0, scaling only on 1 axis. Might help with the debugging effort.

shibekin69 commented 7 years ago

In my test case, If you comment out the lines assigning stuff to:

slotContainer.scale.x slotContainer.scale.y

The result is the rectangles are no longer scaling, but they are still translating (but I didn't put in any translation in the animation.)

AleBles commented 7 years ago

Yeah, I noticed some artifacts too, I'm looking into it. Thanks for adding an example!

shibekin69 commented 7 years ago

Sure thing. I'm thinking, if it's moving, could it be that the registration point on the sprite is off or something? Hmm.. but this can be checked by rotating the sprite. And for some reason, it's hard to transform the phaser sprite object via the console (or maybe I don't know my way around the spine animation object.)