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