The motion of the object along the spline is not perfect

I have a road for roller coaster and a car that should repeat the motion of the spline, but if the road is correctly built, but the turns of the car is far from ideal.


I’ve tried doing it in the BP editor using TimeLine and Get Transform at Distance Along Sline, and I’ve also tried Event Tick.

BP_Cart Event Tick

Since I’m making a road with the help of C++. I tried to use also FInterpCurveQuat and FInterpCurveVector, but it did not give any results, it moves badly too.

C++ try
void ACartBase::Tick(float DeltaTime)
{
	if (DistanceAlongSpline < MaxDistance - 1)
	{
		DistanceAlongSpline += DeltaTime * Speed;

		const FInterpCurveQuat SplineRotation = NL2_Track->Spline->GetSplinePointsRotation();
		const FInterpCurvePoint<UE::Math::TQuat<double>> RotPoint = SplineRotation.Points[DistanceAlongSpline];

		const FInterpCurveVector SplineLocation = NL2_Track->Spline->GetSplinePointsPosition();
		const FInterpCurvePoint<UE::Math::TVector<double>> PosPoint = SplineLocation.Points[DistanceAlongSpline];

		const FTransform Transform = FTransform(RotPoint.OutVal, FVector(PosPoint.OutVal), FVector{1.0f, 1.0f, 1.0f});

		Mesh->SetWorldTransform(Transform);
	}

	Super::Tick(DeltaTime);
}

What am I doing wrong?