So I was able to make him move and walk correctly by changing the code to look like this:
void AUserController::MoveCharacterAutomaticallyToProp(FVector StartMovePoint, FBox MeshCompBox)
{
AActor* InteractiveActor = PlayerCharacter->GetInteractiveActor();
if (InteractiveActor != nullptr && !InteractiveActor->IsPendingKill())
{
UStaticMeshComponent* PropMesh = Cast<UStaticMeshComponent>(InteractiveActor->GetRootComponent());
if (PropMesh != nullptr && !PropMesh->IsPendingKill())
{
if (OriginalPlayerRotation == FRotator::ZeroRotator)
{
OriginalPlayerRotation = PlayerCharacter->GetActorRotation();
}
FVector CurrentPlayerLocation = PlayerCharacter->GetActorLocation();
FVector PropLocation = PropMesh->GetComponentLocation();
FVector PropDirection = (PropLocation - CurrentPlayerLocation);
PropDirection = FVector(PropDirection.X, PropDirection.Y, 0.0f);
PropDirection.Normalize();
FRotator NewPlayerRotation = FMath::Lerp(PlayerCharacter->GetActorRotation(), PropDirection.Rotation(), 0.075);
SetControlRotation(NewPlayerRotation);
UCharacterMovementComponent* PM = PlayerCharacter->GetCharacterMovement();
PM->Velocity = PM->MaxWalkSpeed * PlayerForwadVector * 0.25;
}
}
}
It’s the only way I found that it worked correctly.