We try to use 2 state machines in the same anim bp. Our setup is:
- Basic fullbody locomotion state machine (standing idle, sitting down, sitting idle, stand up, walking) which outputs in cached pose called “LocoCached”. The entry state is “Standing Idle”.
- Another state machine for right hand only (empty, reaching, holding, releasing) that uses the “LocoCached” and blends it with various right hand animations and IK setups.
Basically “empty” state just copies LocoCached to the output and “holding” state blends LocoCached and a holding anim using layered blend per bone node.
Outputs to final pose.
This approach kinda works, except one problem: when state machine #2 changes its state the machine #1 is restarted. Imagine that someone is sitting with empty hands, so machine #1 is in “sitting” state and machine #2 is in “empty state” (that means it just copies LocoCached to its output). Now if we move machine #2 into holding state the machine #1 will be reset to its entry “idle” state and move to “sitting down” state then “sitting” state, therefore the character will stand up and sit down again.
We kinda solved this problem adding to the machine #1 a dummy entry state and a conduit that leads to standing or sitting state without any blending (blend time set to 0). This is better but still the idle animation is restarted.
Is there some better solution to connect two or more state machines?