After applying aim correction, my hand is weird

hello. as you see in the video, my left hand position is wrong when I look up or down.

LeftHandTransform = EquippedWeapon->GetWeaponMesh()->GetSocketTransform(FName("LeftHandSocket"), RTS_World);
		FVector OutPosition;
		FRotator OutRotation;
		ShooterCharacter->GetMesh()->TransformToBoneSpace(FName("hand_r"), LeftHandTransform.GetLocation(), LeftHandTransform.GetRotation().Rotator(), OutPosition, OutRotation);
		LeftHandTransform.SetLocation(OutPosition);
		LeftHandTransform.SetRotation(FQuat(OutRotation));

		if (ShooterCharacter->IsLocallyControlled() && !ShooterCharacter->GetDisableGameplay())
		{
			bLocallyControlled = true;
			FTransform RightHandTransform = EquippedWeapon->GetWeaponMesh()->GetSocketTransform(FName("Hand_R"), RTS_World);
			FRotator LookAtRotation = UKismetMathLibrary::FindLookAtRotation(RightHandTransform.GetLocation(), RightHandTransform.GetLocation() + (RightHandTransform.GetLocation() - ShooterCharacter->GetHitTarget()));
			RightHandRotation = FMath::RInterpTo(RightHandRotation, LookAtRotation, DeltaTime, 30.f);


I calculated LeftHandTransform and Right Hand Transform like above.
And I use Transform(modify) root with RightHandTransfrom and after that use FABRIK with LeftHandRotation to attach my left hand to weapon.

I think the problem is the hand_r is rotated but the left hand is not rotated. how can I fix this? It is so hard…

Thanks in forward!

I can’t really tell what’s causing this, I haven’t worked with c++ before in the engine which is limiting my understanding of the code a bit, but when things like this occur it often helps to double check the transform space you’re using (that all your code is using the same transform space or converting between transform spaces correctly), and maybe try to see what happens if you use a different transform space.