Unreal 5.6 Mover BaseVisualComponentTransform not applied when crouching

Hi there!

In Mover the UMoverComponent has a “FTransform BaseVisualComponentTransform”.

This seems to be used exclusively by the UMoverComponent::FinalizeSmoothingFrame method which appears to never be used outside of UMoverNetworkPredictionLiaisonComponent::FinalizeSmoothingFrame.

Looking at the Mover Examples plugin the ExtendedPawn can crouch. The act of shrinking the capsule (to match the crouch height) will cause the BaseVisualComponentTransform to be properly updated but it is never used.

It’s easy to see that when crouching the character goes underground during the transition and the animation root bone is under the floor.

Feet contact will be restored and maintained by feet IK.

If you disable feet IK the mesh of the character will be partially underground (because the shirking of the capsule is not compensated by a change of offset of the child mesh component).

Adding these (naïve) lines

void UMyMoverComponent::BeginPlay()
{
	Super::BeginPlay();
	OnPostSimulationTick.AddDynamic(this, &UMyMoverComponent::OnPostSimTick);
}
 
void UMyMoverComponent::OnPostSimTick(const FMoverTimeStep& TimeStep)
{
	//partial copy of UMoverComponent::FinalizeSmoothingFrame
	if (!PrimaryVisualComponent->GetRelativeTransform().Equals(BaseVisualComponentTransform))
	{
		PrimaryVisualComponent->SetRelativeTransform(BaseVisualComponentTransform);
	}
}

Seems to maintain proper feet contact even without the feet IK

Is the current setup a simple oversight (i.e., UMoverComponent::FinalizeSmoothingFrame should be called) or is the feet contact expected to be maintained by IK when crouching?

In case it’s the former, how would you suggest I fix it locally while waiting for your fix?

Thanks

Steps to Reproduce
Reproducing the issue entirely within the contents of “Mover Examples Content” plugin

  1. Enable the Mover and Mover Examples plugins
  2. Open “MM_Unarmed_Crouch_Idle” , included in the Mover Examples Content plugin
  3. Notice how the root bone is at the same height of the feet (see attached “Crouch idle anim.png”)
  4. Load Map “L_CharacterMovementBasics”, included in the Mover Examples Content plugin
  5. Start the map
  6. Swap to the extended pawn by entering the pedestal ahead, slightly to the right of the spawn position
  7. Toggle crouch by pressing C
  8. Notice how the character briefly sinks underground before stabilizing correctly on the floor
  9. Using debug notice how the root bone is under the floor, below the feet (see attached “Crouch idle game.png”)
  10. Stop the map
  11. Open “ABP_MannyExtended”, included in the Mover Examples Content plugin
  12. Open the AnimGraph and disable IK (set “Should Do IKTrace” input pin to false)
  13. Start the map
  14. Swap to the extended pawn by entering the pedestal ahead, slightly to the right of the spawn position
  15. Toggle crouch by pressing C
  16. Notice how the character sinks underground and does not stabilizes on the floor (see attached “Crouch idle game no IK.png”)
  17. Using debug notice how the feet are “correctly” aligned with the root bone, under the floor

Hey Filipe,

Yeah, this was an active bug I just actually fixed! It essentially is just setting PrimaryVisualComponents transform to BaseVisualComponentTransform in UMoverComponent::FinalizeFrame so we guaranteed set it every frame. Fix can be found here on GitHub, and should be in the next release of UE.

Thanks,

Nate