Update to build 2023r171ex7p2

This commit is contained in:
SDraw 2023-06-28 08:16:36 +03:00
parent 6f8fa13c94
commit d210ed4636
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
76 changed files with 3349 additions and 1220 deletions

View file

@ -43,12 +43,12 @@ namespace ml_lme
m_inVR = Utils.IsInVR();
m_leftHandTarget = new GameObject("RotationTarget").transform;
m_leftHandTarget.parent = LeapTracking.GetInstance().GetLeftHand();
m_leftHandTarget.parent = LeapTracking.Instance.GetLeftHand();
m_leftHandTarget.localPosition = Vector3.zero;
m_leftHandTarget.localRotation = Quaternion.identity;
m_rightHandTarget = new GameObject("RotationTarget").transform;
m_rightHandTarget.parent = LeapTracking.GetInstance().GetRightHand();
m_rightHandTarget.parent = LeapTracking.Instance.GetRightHand();
m_rightHandTarget.localPosition = Vector3.zero;
m_rightHandTarget.localRotation = Quaternion.identity;
@ -72,7 +72,7 @@ namespace ml_lme
{
if(m_enabled)
{
GestureMatcher.LeapData l_data = LeapManager.GetInstance().GetLatestData();
GestureMatcher.LeapData l_data = LeapManager.Instance.GetLatestData();
if((m_leftArmIK != null) && (m_rightArmIK != null))
{
@ -92,7 +92,7 @@ namespace ml_lme
if(l_data.m_leftHand.m_present && !m_leftTargetActive)
{
m_vrIK.solver.leftArm.target = m_leftHandTarget;
m_vrIK.solver.leftArm.bendGoal = LeapTracking.GetInstance().GetLeftElbow();
m_vrIK.solver.leftArm.bendGoal = LeapTracking.Instance.GetLeftElbow();
m_vrIK.solver.leftArm.bendGoalWeight = (m_trackElbows ? 1f : 0f);
m_leftTargetActive = true;
}
@ -107,7 +107,7 @@ namespace ml_lme
if(l_data.m_rightHand.m_present && !m_rightTargetActive)
{
m_vrIK.solver.rightArm.target = m_rightHandTarget;
m_vrIK.solver.rightArm.bendGoal = LeapTracking.GetInstance().GetRightElbow();
m_vrIK.solver.rightArm.bendGoal = LeapTracking.Instance.GetRightElbow();
m_vrIK.solver.rightArm.bendGoalWeight = (m_trackElbows ? 1f : 0f);
m_rightTargetActive = true;
}
@ -126,7 +126,7 @@ namespace ml_lme
{
if(m_enabled && !m_inVR && (m_poseHandler != null))
{
GestureMatcher.LeapData l_data = LeapManager.GetInstance().GetLatestData();
GestureMatcher.LeapData l_data = LeapManager.Instance.GetLatestData();
Vector3 l_hipsLocalPos = m_hips.localPosition;
Quaternion l_hipsLocalRot = m_hips.localRotation;
@ -232,7 +232,10 @@ namespace ml_lme
if(PlayerSetup.Instance._animator.isHuman)
{
Vector3 l_hipsPos = Vector3.zero;
m_hips = PlayerSetup.Instance._animator.GetBoneTransform(HumanBodyBones.Hips);
if(m_hips != null)
l_hipsPos = m_hips.localPosition;
if(!m_inVR)
{
@ -278,7 +281,7 @@ namespace ml_lme
PlayerSetup.Instance._animator.transform
);
m_leftArmIK.solver.arm.target = m_leftHandTarget;
m_leftArmIK.solver.arm.bendGoal = LeapTracking.GetInstance().GetLeftElbow();
m_leftArmIK.solver.arm.bendGoal = LeapTracking.Instance.GetLeftElbow();
m_leftArmIK.solver.arm.bendGoalWeight = (m_trackElbows ? 1f : 0f);
m_leftArmIK.enabled = (m_enabled && !m_fingersOnly);
@ -293,7 +296,7 @@ namespace ml_lme
PlayerSetup.Instance._animator.transform
);
m_rightArmIK.solver.arm.target = m_rightHandTarget;
m_rightArmIK.solver.arm.bendGoal = LeapTracking.GetInstance().GetRightElbow();
m_rightArmIK.solver.arm.bendGoal = LeapTracking.Instance.GetRightElbow();
m_rightArmIK.solver.arm.bendGoalWeight = (m_trackElbows ? 1f : 0f);
m_rightArmIK.enabled = (m_enabled && !m_fingersOnly);
@ -308,6 +311,9 @@ namespace ml_lme
m_vrIK.solver.OnPreUpdate += this.OnIKPreUpdate;
m_vrIK.solver.OnPostUpdate += this.OnIKPostUpdate;
}
if(m_hips != null)
m_hips.localPosition = l_hipsPos;
}
}