I'm working on a boss enemy, and I want his eyes to follow the player. I made an IK constraint for each eye-bone that targets a bone called player_position_bone. When I move the player_position_bone in Spine, the eyes follow it correctly.
Surprisingly, the only thread I found about this was this one: Is it possible to animate an IK target at runtime?
I've tried setting the player_position_bone's position (bone.setWorldX() and bone.setWorldY()) in numerous different places: before/after the animationState.update(), animationState.apply(skeleton), and setWorldTransform(). The only case that had ANY effect at all was to do it after the updateWorldTransform(), which would cause the player_position_bone to appear in the correct place on the player, but the eyes would still look towards the Setup Pose's location for the player_position_bone.
I also tried with/without an animation that keys the player_position_bone's position in case it was overriding anything by setting it back to the Setup Pose's location every frame.
How/at what point should I be setting the player_position_bone's location in order to have the eye-bone's IK constraint follow it? Should I be using bone.setWorldX/Y?
Thanks!!