From 1cee534825d42e7ba46220fa857d58f5b9fa1fe6 Mon Sep 17 00:00:00 2001 From: Rustin Wollin Date: Wed, 13 Jul 2016 20:42:10 -0400 Subject: [PATCH] fix upside-down hand target rotation --- Assets/Scripts/PlayerBody.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/PlayerBody.cs b/Assets/Scripts/PlayerBody.cs index 554ce7a..288a11a 100644 --- a/Assets/Scripts/PlayerBody.cs +++ b/Assets/Scripts/PlayerBody.cs @@ -45,12 +45,12 @@ void Update () { void OnAnimatorIK() { animator.SetIKPosition (AvatarIKGoal.RightHand, RightHandTarget.position); - animator.SetIKRotation (AvatarIKGoal.RightHand, RightHandTarget.rotation); + animator.SetIKRotation (AvatarIKGoal.RightHand, RightHandTarget.rotation * Quaternion.Euler(180f, 0f, 0f)); animator.SetIKPositionWeight (AvatarIKGoal.RightHand, 1f); animator.SetIKRotationWeight (AvatarIKGoal.RightHand, 1f); animator.SetIKPosition (AvatarIKGoal.LeftHand, LeftHandTarget.position); - animator.SetIKRotation (AvatarIKGoal.LeftHand, LeftHandTarget.rotation); + animator.SetIKRotation (AvatarIKGoal.LeftHand, LeftHandTarget.rotation * Quaternion.Euler(180f, 0f, 0f)); animator.SetIKPositionWeight (AvatarIKGoal.LeftHand, 1f); animator.SetIKRotationWeight (AvatarIKGoal.LeftHand, 1f);