Hello, simple question but I can't seem to find an updated/recent answer.
Before a major update to Spine, bone.SetPosition worked to move around a target bone that was handling IK constraints. Now it seems like this method was replaced by something, but I'm not sure what.
I've seen SkeletonUtility mentioned but it seems like there would be a really simple way to achieve just moving around a free floating bone that I'm missing.
Here's what I'm doing and it half-works, but the bone is jumping around like crazy so it can't be right. gunTargetBonePos is just a Vector2 holding the position of my cursor, and it doesn't "jump." gunTargetBone is my target bone that I'm trying to move. It's never keyed in any animation, but like I said it's flying around.
gunTargetBone.SetLocalPosition(gunTargetBone.WorldToLocal(gunTargetBonePos));
skeletonAnimation.skeleton.UpdateWorldTransform();
Ok so I've narrowed it down to my WorldToLocal call.
gunTargetBone.WorldtoLocal(gunTargetBonePos) is spitting out a position that's oscillating from like 2 to 110, so I am clearly not using this right.
World position is just (worldX, worldY) which again isn't moving when the cursor is still
what am I missing? Thanks!
NEVERMIND I got it lol
forgot InverseTransformPoint.