Inconsistent results with root motion on level sequences, depending on where the user sets the SwapRootBone value.
Steps to Reproduce
It seems the SwapRootBone value on UMovieSceneSkeletalAnimationTrack can get de-synced from the section. We noticed this when a user would set the SwapRootBone value on a section, and not see the level sequence behave correctly (character walking in place).
We noticed that it fixes itself on reopening the editor, which looks like it gets fixed up during UMovieSceneSkeletalAnimationTrack::PostLoad if all sections have the same SwapRootBone value.
void UMovieSceneSkeletalAnimationTrack::PostLoad() { ... //if we have all sections with the same swap root bone, set that, probably from a previous version if (bAllSectionsSameSwapRootBone && SectionsSwapRootBone.IsSet()) { SwapRootBone = SectionsSwapRootBone.GetValue(); }
Our current workaround is to set the SwapRootBone value on the UMovieSceneSkeletalAnimationTrack, which will sync it to all sections
void UMovieSceneSkeletalAnimationTrack::SetSwapRootBone(ESwapRootBone InValue) { SwapRootBone = InValue; for (UMovieSceneSection* Section : AnimationSections) { UMovieSceneSkeletalAnimationSection* AnimSection = Cast<UMovieSceneSkeletalAnimationSection>(Section); if (AnimSection) { AnimSection->Params.SwapRootBone = SwapRootBone; } } RootMotionParams.bRootMotionsDirty = true; }
Hey there,
Thanks, I believe we have this logged internally as well. Looking at your code example and workarounds, this matches the code in mainline UE 5.5. Are there edits that I am missing in your code above?
Dustin
The code posted are just the relevant blocks. We have no changes to the UE5.5 code. Can we get a link to the internal issue for our tracking?
https://issues.unrealengine.com/issue/UE-183696, It can take 24 hours for it to show up on the issues site.