Single Frame Blendspace nodes don't correctly sample/generate root motion. The reason for this is because of how we calculate the delta to bump the sampling within the blendspace each frame. In a single frame blendspace FAnimNode_BlendSpacePlayer::PlayRate will always be zero. This means that MoveDelta in UBlendSpaceBase::TickAssetPlayer() will always be zero which results in NormalizedCurrentTime & NormalizedPreviousTime always being the same (ie. FAnimationRuntime::AdvanceTime(Instance.bLooping, MoveDelta, /inout/ CurrentTime, NewAnimLength); does not change the current time).
This means that when we attempt to sample the root motion in:
Context.RootMotionMovementParams.AccumulateWithBlend(Sample.Animation->ExtractRootMotion(PrevSampleDataTime, DeltaTimePosition, Instance.bLooping), SampleEntry.GetWeight());
we don't get any root motion as we've sampled with a zero delta time increment and the current (rather than previous) sample time.
We need another way of generating/storing the current / previous sample times along with the delta time in order to resolve this.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-120375 in the post.
0 |
Component | UE - Anim - Runtime |
---|---|
Affects Versions | 4.26 |
Target Fix | 5.0 |
Created | Jul 26, 2021 |
---|---|
Resolved | Nov 24, 2021 |
Updated | Jan 26, 2023 |