Another alternate solution using FVector::PointsAreNear

uem_s01_sending_the_platform_back

#1

Here is the solution I came up with for those interested.

void AMovingPlatform::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

	if (HasAuthority())
	{
		if (FVector::PointsAreNear(GetActorLocation(), OriginLocation, MoveSpeed * DeltaTime))
			Direction = (TargetLocation - OriginLocation).GetSafeNormal();
		if (FVector::PointsAreNear(GetActorLocation(), TargetLocation, MoveSpeed *DeltaTime))
			Direction = (OriginLocation - TargetLocation).GetSafeNormal();
		
		FVector Location = GetActorLocation();
		Location += Direction * MoveSpeed * DeltaTime;
		SetActorLocation(Location);
	}
}