I'm working on a 2D game with a character that shoots a gun.
I'm using Spine, and I'm trying to get the world position and rotation of the gun muzzle bone (e.g., ShotPos) to spawn bullets in the correct direction.
Using bone.WorldX / bone.WorldY and converting them with transform.TransformPoint() gives me the correct position in world space.
However, when I use bone.WorldRotationX to get the rotation (Z-axis), it doesn't change when the character is flipped (scale.x is negative).
In other words, the character visually faces left, but the rotation still behaves as if it's facing right.
How can I get the visually correct rotation of the bone when the character is flipped horizontally?