The question:
On my Anim State Machine entering a new state does not reset the pose ONLY if it is cached. Is this a bug? or, how do I restart this cashed pose from frame 0?
For I have cached animation poses that refuse to reset to frame 0 when my state starts. (normal poses do reset)
Info:
I do not use animation montages and can not use them as a solution.
My reason for this is that I do not want to mix up responsibilities of the graphs and state machine. I want all state logic to be inside of my state machine with no chance of an animation montage overriding it for basic use like jumping or attacking.
My setup:
For my character I have configured a simple animation blueprint.
All of the animations including actions like jumping and attacking are selected through the Animation State Machine.
The EventGraph:
stores booleans when an action is requested, (attack button pressed, jump button etc) and logic for notifies etc.
The AnimGraph:
blends my animations, like sword_attack or fist_attack based on what weapon is held, then stores it into the pose cache “attack”
The StateMachine:
Evaluates stored booleans and moves into next state if allowed to. When it moves to state Attack it will use the attack animation used in the cache “attack”.
So the problem is, when I use the cache “attack” it won’t ever reset to frame 0, I don’t want it to loop or start halfway. If I don’t use the cache but a single pose instead, it works just fine but then I can not work with caches or blending as required.
Am I running into a bug or limitation of the state machine? Is there are solution not using montages?
After playing with it a bit, it seems like it could work if you put each animation in its very own state machine and then blended the state machines. For some reason it doesn’t like the poses out in the open.
Thank you for your response, but I don’t need multiple state machines, I need the cached poses to work properly within my single state machine :). State machines are only used to switch between states, like Idle, Aim, Attack, Jump etc. For my humanoid characters only one state machine is required.
I quit attempting to do this in animations because the issue described here prevented me from doing what I wanted with state machines. This was back on UE4 so I can’t tell if it still happens on UE5.
I thought I’d revive this topic since I have the same issue which seems to significantly limits the use of the cache node.
Context:
I want to use a cache node for a Hit Reaction state.
I had an issue with the State not reseting if it was re-triggered while blending out.
See this thread: (Animation State transitions not Resetting?)
Current Solution:
I duplicated the hit state (Slot1 and Slot2)
From the character blueprint, I keep track of the previous active slot and always alternate in between Slot1 and Slot2.
That fixed the issue of the Hit not reseting if it triggered while blending out of itself.
Problem:
Now, I have two copies of the Hit Reaction state.
To avoid duplication, I thought I’d use a cache pose. But if I do, the Hit State never resets.
Question:
Is there a bug for this?
Am I missing something?
I tried to set:
The Cached State machine to “Reinitialized On Becoming Relevant”.
The State inside the cached State Machine to “Always Reset on Entry”
The Hit Reaction Slot States both are set the “Always Reset on Entry” as well.
I’ve seen the post of Detach789 suggesting having all animations separated in different states in a state machine, but that doesn’t seem like an efficient way to just picking an animation.
I only have to anims at this time but I’ll have a lot of type and variations.
Here’s some screen shots. Hopefully it’s clear enough, if not, I’d be happy to provide more info!