Automatic rule based transition is used, in most cases, if you want an auto-transition from source state to target state when the source animation ends.
For example, consider a state transition from State
An alternative way to implement state transition condition is to use
Get Relevant Time Remaining node like this:
But this is, to some extent, dirty and expensive. We cannot use
Animation variable with it, even worse,
Fast Path does not work with this way.
The proper method in this case is to check
Automatic Rule Based on SequencePlayer in State of this transition:
Transition would start when there is 0.2 second left in the source state animation. This is clean and elegant.
For the official UE4 engine,
Automatic Rule Based Transition does not work with a back-playing sequence. Because transition only cares about the accumulated time of an animation asset.
if (UAnimationAsset* AnimAsset = RelevantPlayer->GetAnimAsset())
As a result, for a back-playing animation sequence, it does not work as expected. Hence some modifications are needed:
We need to add a function for each
FAnimNode_AssetPlayerBase to get real play rate:
And override this function in
And that’s it! Enjoy this feature!