Pawn doesn't rotate to the direction of movement

I’m trying to make it so the pawn rotates to the direction of movement but it doesn’t work.

GetCharacterMovement()->bOrientRotationToMovement = true;
GetCharacterMovement()->RotationRate = FRotator(0.0f, 500.0f, 0.0f);
bUseControllerRotationPitch = false;
bUseControllerRotationYaw = false;
bUseControllerRotationRoll = false;

I got these lines from the example code in the template but I can’t get it to work on mine. I’m guessing this is because I’m using simulate physics because that’s a part of the reason why I’m having quite a lot of issues. Please let me know if I need to post more parts of the code.

I got it working by using the code below, hope this helps someone else as well.

1 Like