Download

Beginner Rotate via RInterpTo question

Hi. So I’d like to smoothly rotate my pawn from it’s current rotation to a new rotation. This used to work fine in UDK, but I can’t get it to work in C++:



ATutorialCodeCharacter* MyCharacter = Cast<ATutorialCodeCharacter>(UGameplayStatics::GetPlayerPawn(this, 0));
			
MyCharacter->FaceRotation(FMath::RInterpTo(pPawnRot, MyRightStickRotator, DeltaTime, LegsRotationSpeed), DeltaTime);

If I use SetActorRotation like so:


	SetActorRotation(FRotator(MyRightStickRotator));

then it instantly snaps.

Any ideas please?

Thanks

This works for me:



YourActor->SetActorRotation(FMath::RInterpTo(StartRot, TargetRot, GetWorld()->GetDeltaSeconds(), Speed));


thanks honaj, I realised I had my rotation speed really really fast.

If you’ve got a sec could you help me with this one please?

https://forums.unrealengine.com/showthread.php?68172-Multiple-slots-or-Multiple-Montages-Question