Hi, I encountered the same issue. I have multiple characters sharing the same skeleton and they all have different sizes. They work well in Unreal with all animations, except the root motion animations. I analyzed the issue, and its evident from the visuals that the root motion (red line in the viewport) is not rescaling based on the model, while everything else is (using the right “animation scaled” setting on the pelvis and “Skeleton” settings on the other bones).
To solve the issue you have to:
- enable “Root Motion” in the animation assets, this will show the char move in place while playing the single animations, but dont worry
- enable “Root Motion from everywhere” or “Root Motion in Montages” inside the Animation Blueprint “Class Defaults” panel
- Create a C++ function which is setting the scale for your character, in my case I did:
class RETARGETWITHSCALE_API UBPUtils : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintCallable, Category = "PS")
static void SetRootMotionScale(ACharacter* pawn, float scale);
void UBPUtils::SetRootMotionScale(ACharacter* pawn, float scale)
Then in the BP construction script of your character BP call the SetRootMotionScale with the right scale. I didnt yet figure out a way to read this value from the character itself, so I pass a manual value.
This will now result in the character (and its capsule) actually moving forward by an amount scaled properly. So his feet will be firmly on the ground if you pass in the right scale and no sliding will occur.
Side note: One other issue remains for root motion animations which are moving the char also vertically (example a jump), as the capsule will stay on the ground instead.