How can I smoothly Lerp Character Rotation?

Hey all,

I’m currently working on having my character Lerp its rotation to wherever the camera is pointing. Right now I’m seeing no visible rotation of the character and I’m wondering if I’m doing this the right way. I’ve been extending off the third person demo.

Here’s the code I’m using to Lerp

	if (falling)
	{
		FTransform charTransform = GetTransform();
		const FRotator cameraRotation = FollowCamera->GetComponentRotation();
		const FRotator transformRotation = charTransform.Rotator();
		
		FRotator result = FMath::RInterpTo(transformRotation, cameraRotation, DeltaTime, 500);

		charTransform.SetRotation(result.Quaternion());
	}

What would I be doing wrong here?

Thanks in advance,

You should check the ‘Orient Rotation To Movement’ flag (in the movement section) as well as the ‘Use controller rotation’ ones in the pawn section.

I had those checked before but it’s an instant follow. I guess what I’m looking for is catchup behavior. So that character lags behind the camera as it rotates.

Try calling SetControlRotation on the char.

I am also unable to get my characters to gradually turn to face a rotation

You only copy the current transformation and then edit the copy, notice that you do not use a pointer here.
You are missing:

SetActorTransform(charTransform);

Megumi is right try setting the transform. This is C++ , I think you are attempting to set the transform similar to in unity which uses c#.