azerion / phaser-spine

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

[Spine-TS] Rotation property doesn't work #77

Open shibekin69 opened 7 years ago

shibekin69 commented 7 years ago

Just like the alpha property. Rotation on the group containing the spine object, or applying to the child spine object, or to a spine object directly doesn't work.

shibekin69 commented 7 years ago

This seems to work. Might need further testing though since the positioning problem's still there.

AleBles commented 7 years ago

Yeah The thing I noticed that the current setup ALWAYS rotates around the rootbone. Which isn't inherently bad, but the same discussion we had with regards to the position applies here imho, asin; also allow rotation not based on rootbone but on anchor

shibekin69 commented 7 years ago

I tested this again with the latest build and I noticed that the [rotation and angle] property on the group container uses Spine's rotation and not Phaser's. You might want to make it Phaser's rotation (or give the option to use either one). If your spine animation has bones that don't inherit rotation and/or scale, this will look weird (but may make for interesting effects too)

shibekin69 commented 7 years ago

Yeah, I thought my animations suddenly became broken! Good thing I remembered this works in a different way. The rotation on the old phaser-spine's good, maybe the option to rotate the spine object as a Sprite (like in the old phaser-spine) and as a root bone (like now) is good.

shibekin69 commented 7 years ago

Rotation seems to work on WebGL the way it does with Canvas. Since the scaling is a problem, I can't tell if it's being weird.