Add Bone Rotation in C++

Hey guys, I’m looking for help solving an issue I’ve run in to with Rotators.

I’m able to rotate the bones, but the FRotator locks at 90 degrees.

Any way around this?


void AAircraftPawn::AnimateProps(float DeltaTime)
{
    FRotator CurrentRotation = PoseMesh->GetBoneRotationByName(FName("Prop_left"), EBoneSpaces::ComponentSpace);

    FRotator PropRotation = CurrentRotation;
    PropRotation.Pitch -= PropSpeed * DeltaTime;

    PoseMesh->SetBoneRotationByName(FName("Prop_left"), PropRotation, EBoneSpaces::ComponentSpace);
    PoseMesh->SetBoneRotationByName(FName("Prop_right"), PropRotation, EBoneSpaces::ComponentSpace);

    //GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Yellow, PropRotation.ToString());
}

The solution is shown below.
Enter the angle of the change difference in AddRotate. This time, I’m only tilting Pitch by 1.

FRotator Rotate = PoseableMeshComponent->GetBoneRotationByName(BoneName,EBoneSpaces::Type::WorldSpace);
		FRotator AddRotate = FRotator(1,0,0);
		FRotator NewRotate = FRotator(FQuat(AddRotate) * FQuat(Rotate));
		PoseableMeshComponent->SetBoneRotationByName(BoneName,NewRotate,EBoneSpaces::Type::WorldSpace);