I have a MovingPlatform that can rotate as well. Rotation issue

Hi I am Anant Shah, I have some issue in my code , I have a MovingPlatform That can rotate as well. I try to set up like , what ever is platfom rotation it dosent meter just add this rotation in my platfom , like Rotation Start + Target , This is my code

 void AMovingPlatform::RotatePlatform(float DeltaTime)
{
if (ShouldTargetRotation)
{
Alpha = FMath::Clamp(Alpha + (TargetRotationSpeed * DeltaTime), 0.0f, 1.0f);// clamp use for to between min & max value

	FQuat RotatorOffset = FQuat::SlerpFullPath(StartRotationQuat, TargetRotationQuat, Alpha);//for smooth interpolation

	SetActorRotation(RotatorOffset);
	DrawDebugLine(GetWorld(), GetActorLocation(), GetActorLocation() + GetActorForwardVector() * 100, FColor::Red, false, -1.f);
	DrawDebugPoint(GetWorld(), GetActorLocation() + GetActorForwardVector() * 100, 20, FColor::Red, false, -1.0f, 0);
	
	if (Alpha >= 1.0f)
	{
		ShouldRotate = false;
		FQuat S_Rotate = TargetRotationQuat;
		FQuat T_Rotate = StartRotationQuat;
		StartRotationQuat = S_Rotate;
		TargetRotationQuat = T_Rotate;
		Alpha = 0.0f;
	}
}
else
{
	AddActorLocalRotation(RotationVelocity);
	DrawDebugLine(GetWorld(), GetActorLocation(), GetActorLocation() +   GetActorForwardVector() * 100, FColor::Red, false, -1.f);
	DrawDebugPoint(GetWorld(), GetActorLocation() + GetActorForwardVector() * 100, 20, FColor::Red, false, -1.0f, 0);
}

}

Are you following the Obstacle Assault part of the course? If so, check the end of lecture code. it seems to me just looking at this that you have made it far more complicated than necessary - you can do this without Quaternions.

if you are following the course, it helps to post in the Q&A section for that lecture too as I rarely check here.

I am not just follow the course, I am try to experiment. Can you share solution with me or you can give me lecture no. that can solve this problem

Hi,

We can’t really spend the time offering solutions to content outside of the course unless we have an immediate solution, in this case the solution is covered in the course. You can ask on the discord and you can get the link from section 1 of the course where the community is discussed.

Sorry I can’t be of more help.

Thanks for that, now I know this was include in course. I will find this solution as soon as
possible