I followed this tutorial to implement pick up and rotation in a game I’m working on. The issue I’m having is that the actor only rotates on two axes. This is the way I’m currently rotating it:
void APickupAndRotateActor::RotateActor()
{
ControlRotation = GetWorld()->GetFirstPlayerController()->GetControlRotation();
SetActorRotation(FQuat(ControlRotation));
}
The GetControlRotation() returns the FRotator from the mouse. So only the Pitch and Yaw have a value, but the Roll has none, as expected. Not only that, but since I’m rotating the actor with SetActorRotation(), it means I am rotating it based off of the forward of the actor itself, which is awkward. Both of these combined lead to awkward and incomplete actor rotation controls, seen here. Is there any possible way to use the mouse’s FRotator input to synthesize a smoother actor rotation, where moving the mouse up and down always makes the actor rotate up and down, and moving the mouse left and right always moves actor left and right?