How to set a C++ side scroller Characters rotation

I amcreating a 3D side scroller and I have a character set up. Right now the character can move side to side but I can’t seem to set the characters rotation. What I’m trying to do is set the players rotation to Z axis to 90 when the player press the A key and then set the Z axis to 270 when they press the D key. I’ve tried
Player->SetActorRotation(0.0f, 90.0f, 0.0f); but it doesn’t seem to do anything. Any help would be great thanks

have you played around with SetRelativeRotation? Perhaps AddMovementInput in the player class could help

Okay, would you be able to give me an example?

Sure, try doing something like:

Player->SetActorRelativeRotation(FRotator(0, 90, 0));

Or you can try:

UPrimitiveComponent* playerComp = Cast<UPrimitiveComponent>(Player->GetRootComponent());
playerComp->SetRelativeRotation(FQuat(FVector(0, 1, 0), 90));

Or for the input possibility:

this->AddMovementInput(FVector(something), 90);

Awesome thank you! I will give that a try