Changing character rotation to movement direction

I’m trying to setup a character so that it will rotate to the direction of the movement. e.g. push up it faces up, push left it faces left. I have set bUseControllerRotationYaw = false and GetCharacterMovement()->bOrientRotationToMovement = true;. From what I have been able to gather this is really all I need to do to get the movement to work as desired.

Here is the code I’m using for the character:

// Fill out your copyright notice in the Description page of Project Settings.

#include "RPG.h"
#include "RPGCharacter.h"


// Sets default values
ARPGCharacter::ARPGCharacter()
{
    // Set this character to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
    PrimaryActorTick.bCanEverTick = true;

    bUseControllerRotationYaw = false;

    GetCharacterMovement()->bOrientRotationToMovement = true;
    GetCharacterMovement()->RotationRate = FRotator(0.0f, 0.0f, 540.0f);
    GetCharacterMovement()->MaxWalkSpeed = 400.0f;
}

void ARPGCharacter::MoveVertical(float Value)
{

    if(Controller != NULL && Value != 0.0f)
    {
        const FVector moveDir = FVector(1,0,0);
        AddMovementInput(moveDir, Value);
    }
}

void ARPGCharacter::MoveHorizontal(float Value)
{
    if(Controller != NULL && Value != 0.0f)
    {
        const FVector moveDir = FVector(0,1,0);
        AddMovementInput(moveDir, Value);
    }
}

// Called when the game starts or when spawned
void ARPGCharacter::BeginPlay()
{
    Super::BeginPlay();	
}

// Called every frame
void ARPGCharacter::Tick( float DeltaTime )
{
 Super::Tick( DeltaTime );
}

// Called to bind functionality to input
void ARPGCharacter::SetupPlayerInputComponent(class UInputComponent* InputComponent)
{
Super::SetupPlayerInputComponent(InputComponent);

}

I have created a blueprint for the character and Inherited from ARPGCharacter. I have added the mannequin that is bundled with the animation starter kit as mesh and a customer camera class.

I’m not sure where else I should be looking to configure this correctly

Are you sure that you need to disable bUseControllerRotationYaw?
I mean from what I’ve gathered, you want to rotate around the Z axis, which is also referred to as yaw.

I am basing my implementation off a UE4 book I’m working through. From what I can tell the documentation recommends that it be cleared here

Be sure the Rotation Rate property is not 0,0,0. This handles how fast it orients.

I have the Rotation Rate set on line 16 with GetCharacterMovement()->RotationRate = FRotator(0.0f, 0.0f, 540.0f); . Is this what you mean?

Yarp.

Does this work in your scene if you do it all through blueprint in the default properties of a character?

Inside of the CharacterMovement(Inherited) component under the player blueprint. I found that the Rotation Rate for the Yaw was 0 and the Pitch was 540.0. Maybe I’m reading the documentation wrong, but I thought the Third argument for FRotator was the yaw and the blueprint would have inherited that value. Anyway that fixed it, thank you very much for your help.

ahh right, yeah from the docs:

FRotator
(
float InPitch,
float InYaw,
float InRoll
)

easy thing to miss for sure since the editor uses a different order.