If I understand, you say when you do this:
anim.state.setAnimation(0, "run", true);
anim.state.setAnimation(1, "attack_idle", false);
Then you see torso_target
positioned where it is keyed in animation run
. Is that right? Is torso_target
keyed in animation attack_idle
?
And you say when you do this:
anim.state.setAnimation(0, "run", true);
anim.state.ClearTrack(1);
anim.state.setAnimation(1, "attack_idle", false);
Then you see torso_target
positioned where it is keyed in animation attack_idle
. Is that right? If torso_target
is keyed in both animations, you will see the torso_target
position from the animation on the higher track (track 1 in your example). Clearing track 1 first does not affect this at all.
You can use the Preview view in the Spine editor to apply your animations on tracks 0 and 1 and see how they behave.