If you only need it once, Mitch's recommendation should be enough:
transform.TransformPoint( new Vector3( bone.WorldX, bone.WorldY, 0) )
I think TransformPoint
returns a Vector3
for you to use.
@Mitch, This does sound like a good extension method for Spine-Unity. I feel like we talked about this before. Or did we stop at the color getters and setters?
For the naming, I agree it can be misleading for someone looking for the world position of a bone.
I'm almost certain it's some kind of legacy thing that has to do with how Spine editor's internals were put together originally. After all, in the editor, there is no other "world". Changing variable names definitely doesn't just affect Spine-Unity or other Spine-C# users (XNA, MonoGame) but also users of all the other languages too; Spine runtimes mostly share these variable and method names across languages. I wouldn't hold my breath for an immediate change.
Just hypothetically though, I wonder what would be good, short names instead of worldX
and worldY
.