Inconsistent transition results in animation state machine when using ‘Automatic Rule Based On Sequence Player In State’

Hello,

I had discovered that the animation state machine transition has a different result between sequences and blendspaces when making use of the ‘bAutomaticRuleBasedOnSequencePlayerInState’. The transition would use the animation sequence length correctly when checking remaining time but for blendspaces it will always use a value between 0-1, making it not use the length of the leading animation within the blendspace.

When looking at the code path inside FAnimNode_StateMachine::FindValidTransition, when calculating AnimTimeRemaining. AnimAsset->GetPlayLength() gets called, this returns either the sequence time or the normalized value (0-1)for blendspace players. According to comments, the return value is 0-1 by design. However I was wondering if for the automatic transition rule, AnimTimeRemaining should return a similar result as FAnimNode_StateMachine::GetRelevantAnimTimeRemaining instead?

[Attachment Removed]

Hey there,

Yes,

AssetPlayer->GetCurrentAssetLength() - AssetPlayer->GetCurrentAssetTimePlayRateAdjusted()should give you a more accurate result.

I’m chatting with the dev team now to see if this is something that they want to adjust or make optional, but if you would like to make that change for your engine or add a branch in your code that checks if the anim asset is a Blendspace then that makes sense.

Dustin

[Attachment Removed]