How can I add vectors and rotators relative to other vectors and rotators?

I want to offset ShooterCharacters’ weapon relative to their view. First, I want to alter its relative rotation, then offset its location by a vector relative to the weapon’s new rotation. I cannot figure out how to do it, and I was hoping someone better at programming or mathematics could help.
Below is the code I am trying to alter; I can get the pitch to offset correctly by editing RotCameraPitch, but I cannot get the yaw or roll to change relative to the player’s view, let alone attempt to offset the location relative to that rotation. (I cannot notice RotCameraYaw having any effect, which is strange.)

void AShooterCharacter::OnCameraUpdate(const FVector& CameraLocation, const FRotator& CameraRotation)
{
	USkeletalMeshComponent* DefMesh1P = Cast<USkeletalMeshComponent>(GetClass()->GetDefaultSubobjectByName(TEXT("PawnMesh1P")));
	const FMatrix DefMeshLS = FRotationTranslationMatrix(DefMesh1P->RelativeRotation, DefMesh1P->RelativeLocation); //Location/rotation of mesh relative to its owner.
	const FMatrix LocalToWorld = ActorToWorld().ToMatrixWithScale(); //Location/rotation of the player.

	// Mesh rotating code expect uniform scale in LocalToWorld matrix
	const FRotator RotCameraPitch(CameraRotation.Pitch, 0.0f, 0.0f); //Pitch of camera
	const FRotator RotCameraYaw(0.0f, CameraRotation.Yaw, 0.0f); //Yaw of camera

	const FMatrix LeveledCameraLS = FRotationTranslationMatrix(RotCameraYaw, CameraLocation) * LocalToWorld.InverseSafe();
	const FMatrix PitchedCameraLS = FRotationMatrix(RotCameraPitch) * LeveledCameraLS;
	const FMatrix MeshRelativeToCamera = DefMeshLS * LeveledCameraLS.InverseSafe();
	const FMatrix PitchedMesh = MeshRelativeToCamera * PitchedCameraLS;

	Mesh1P->SetRelativeLocationAndRotation(PitchedMesh.GetOrigin(), PitchedMesh.Rotator());
}