Hello!
I am trying to move one Spine skeleton animation character to another Spine skeleton animation character so that they're positioned right next to each other on this x-axis.
Prior to using spine I did this with Unity's Sprite Render by using:
TargetPosition = new Vector3
((TargetEnemy.transform.position.x - (Hero.Sprite.bounds.extents.x + TargetEnemy.Sprite.bounds.extents.x)),
TargetEnemy.transform.position.y,
TargetEnemy.transform.position.z);
I'd like to accomplish the same exact thing with Spine skeleton animations. I believe I can use skeleton.GetBounds() to do this, correct?
I tried my best to search the forums on how to use this function, but I don't really understand it.
I believe you can set it up this way, but I don't know what I'm supposed to use for the 3rd argument 'width'.
var offset = new Vector2();
var size = new Vector2();
skeleton.GetBounds(offset,size,[]);
Once I successfully obtain offset,size, & width from GetBounds(), how can I use this information to know the distance from the middle of the skeleton animation to the right side of it?
I hope this all made sense. Thanks so much for taking the time! 😃