Using same Animation in Blendspace w/ different Rate Scale not working

When having a Blendspace (1D) with with only one Animation on different Values but differetn Rate Scales, the Blendspace does not blend the Rate Scales correctly.

For example :
Blendspace (1D) with Walk and Run:

X: 0
Animation Sequence: Walk
Rate Scale: 0.01

X: 50
Animation Sequence: Walk
Rate Scale 1.0

X: 100
Animation Sequence Run
Rate Scale 1.0

You can observe that the Walk Animation does not blend between slow and normal but it stays with the normal speed between X = 0 and X = 50

Hey Raildex,

Thanks for reporting this, but it was recently logged in our system as UE-46560. You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

I have recently discovered this problem (in UE4.24) and fixed it by changing this line in BlendSpaceBase.cpp line 317 (around the middle of UBlendSpaceBase::TickAssetPlayer):

#if 0 //CA EDIT [DENES_NAGYMATHE 15/09/2020] ORIGINAL CODE
					const float NewDeltaTime = Context.GetDeltaTime() * Instance.PlayRateMultiplier * Sample.RateScale * Sample.Animation->RateScale;
#else //CA EDIT [DENES_NAGYMATHE 15/09/2020] MODIFIED CODE
					const float NewDeltaTime = Context.GetDeltaTime() * Instance.PlayRateMultiplier * SampleDataItem.SamplePlayRate * Sample.Animation->RateScale;
#endif //CA EDIT [DENES_NAGYMATHE 15/09/2020]

The problem was that it used Sample.RateScale, which is the preset rate for one of the control points with the same animation clip; the correct, blended rate is actually calculated earlier, that is the similarly named SampleDataItem.SamplePlayRate.
It works fine ever since.

3 Likes