almost working hand mondel animation adjusted to the api changes

This commit is contained in:
Mamadou Babaei
2023-03-28 10:39:04 +02:00
parent 47fdb091e6
commit 099820454f
@@ -362,17 +362,15 @@ TMap<FName, FRotator> ASGVirtualHand::GetFingersBonesRotations()
for (int32 JointIndex = 0; JointIndex < FingerJointAngles.Num(); ++JointIndex)
{
const FVector& JointAngle{FMath::RadiansToDegrees(FingerJointAngles[JointIndex])};
const FVector& JointAngle{FingerJointAngles[JointIndex]};
const FQuat JointRotation{FQuat::MakeFromEuler(JointAngle)};
const FTransform& BoneRefTransform{GetFingerBoneRefTransform(FingerIndex, JointIndex)};
FQuat NewBoneRotation{JointRotation * BoneRefTransform.GetRotation()};
FQuat NewBoneRotation{BoneRefTransform.GetRotation() * JointRotation};
FName BoneName{GetFingerBoneName(FingerIndex, JointIndex)};
SGLOG(BoneName, JointRotation.Rotator(), BoneRefTransform.Rotator(), NewBoneRotation);
Rotations.Emplace(MoveTemp(BoneName), MoveTemp(NewBoneRotation));
}
}