After the decoupling exercise, UGoKartMovementReplicator depends on UGoKartMovementComponent by calling MovementComponent->GetLastMove(). So, depending on what order those Tick methods get called, the replicator might be using information that is one frame old. Obviously, everything will still be functional if that’s the case, but just to save a few potential milliseconds of latency (one could be unlucky and that could be the one frame where someone went from turning left to turning right), I’ve added the AddTickPrerequisiteComponent to my BeginPlay:
void UGoKartMovementReplicator::BeginPlay()
{
Super::BeginPlay();
MovementComponent = GetOwner()->FindComponentByClass<UGoKartMovementActorComponent>();
// Ensure tick on MovementComponent is called before the one here on UGoKartMovementReplicator
AddTickPrerequisiteComponent(MovementComponent);
}
Of course, I’m not going to be surprised if the course already points this out in a few lessons. I’ve had that happen almost every time so far with questions that have popped into my head…