Code Third Person Template Movement Bug

In the function MoveForward in the character, the pitch is filtered from the rotation, but then the original unfiltered rotation is used, causing movement to change speed if you’re not looking exactly straight ahead with the camera.

MoveRight is implemented correctly.

void AThirdPersonCodeExpCharacter::MoveForward(float Value)
{
	if ((Controller != NULL) && (Value != 0.0f))
	{
		// find out which way is forward
		const FRotator Rotation = Controller->GetControlRotation();
		const FRotator YawRotation(0, Rotation.Yaw, 0);

		// get forward vector
		const FVector Direction = FRotationMatrix(Rotation).GetUnitAxis(EAxis::X);
		AddMovementInput(Direction, Value);
	}
}

This line:

const FVector Direction = FRotationMatrix(Rotation).GetUnitAxis(EAxis::X);

Needs change to:

const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X);

Hello,

Thank you for your report. We were not able to investigate this on the engine version you reported, but there have been many version changes to UE4 since this question was first posted. With a new version of the Engine comes new fixes and it is possible that this issue has changed or may no longer occur. Due to timetable of when this issue was first posted, we are marking this post as resolved for tracking purposes.

If you are still experiencing the issue you reported in the current engine version, then please respond to this message with additional information and we will investigate as soon as possible. If you are experiencing a similar, but different issue at this time, please submit a new report for it.

Thank you.

It is resolved in the 4.5 preview.