[SOLVED] Actions generated with ActionSequence affecting other layers

One action, stab_once_body (stabbing with sword, once) plays fine on the “body” layer, until it’s twin (stab_once_legs) is played on the “legs” layer at the same time, then:

  • Stab_once_body starts playing slowly from the middle to the end, and has unintended waiting at the end.
  • I’m not sure exactly what stab_legs is doing, but it appears to play the first half of the animation twice.

Both stab_once actions are generated using anim.actionSequence and use stab_body and stab_legs. Stab_body and stab_legs do not have this issue.

anim = person.getControl(AnimComposer.class);
SkinningControl skin = person.getControl(SkinningControl.class);
anim.makeLayer("body", ArmatureMask.createMask(skin.getArmature(), "lower_body"));
ArmatureMask legmask = new ArmatureMask();
legmask.addFromJoint(skin.getArmature(), "legs_main");
legmask.addBones(skin.getArmature(), "main");
anim.makeLayer("legs", legmask);
anim.actionSequence("stab_once_body", anim.action("stab_body"), Tweens.callMethod(anim, "setCurrentAction", "idle_body", "body"));
anim.actionSequence("stab_once_legs", anim.action("stab_legs"), Tweens.callMethod(anim, "setCurrentAction", "idle_legs", "legs"));
anim.setCurrentAction("stab_once_body", "body");
anim.setCurrentAction("stab_once_legs", "legs");

The model can be found here.

It sounds like you may be experiencing this same exact issue that I recently encountered as well:

@Ali_RS helped me find a good fix, and I eventually ended up calling Tweens.sequence(actionToPlay, doneTween) instead of calling anim.actionSequence() (which seems to be broken when used with masks, based on both of our findings)


Note, that issue was solved in 3.6.


I probably better named it setMaskDispatchingEnabled instead of setMaskPropagationEnabled :roll_eyes: My bad!


Yep, updating to 3.6 fixed the problem. Thanks! :grin: