To obtain the world scale of a bone in the Spine C++ runtime, you can use the getWorldScaleX
and getWorldScaleY
methods. These methods provide the scale of a bone in world space relative to the world space x-axis and y-axis, respectively. However, if you need the signed scale, you should ensure that the local scale and any transformations applied to the bone are considered. The world scale is computed based on the local scale and the transformations of parent bones, so you may need to manually calculate the sign by considering the local scale and any rotations that might affect the sign of the scale.
If the getWorldScaleX
and getWorldScaleY
methods are returning only positive values, you might need to check the local scale and the hierarchy of transformations to determine the correct sign. This involves understanding how the local transformations are applied and how they propagate through the bone hierarchy.