mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-04 19:09:23 +00:00
Instance set changes
Additional animator parameters Reworked rigidbodies Update to latest LeapC and LeapCSharp
This commit is contained in:
parent
1f0b518761
commit
075ff67304
38 changed files with 8310 additions and 8646 deletions
|
@ -48,6 +48,9 @@ namespace ml_pam
|
|||
HandState m_leftHandState = HandState.Empty;
|
||||
HandState m_rightHandState = HandState.Empty;
|
||||
|
||||
AvatarBoolParameter m_leftHandParameter = null;
|
||||
AvatarBoolParameter m_rightHandParameter = null;
|
||||
|
||||
// Unity events
|
||||
void Start()
|
||||
{
|
||||
|
@ -239,7 +242,7 @@ namespace ml_pam
|
|||
{
|
||||
m_enabled = p_state;
|
||||
|
||||
if(m_enabled)
|
||||
if(p_state)
|
||||
{
|
||||
if(m_leftHandState != HandState.Empty)
|
||||
SetArmActive(Settings.LeadHand.Left, true);
|
||||
|
@ -335,6 +338,8 @@ namespace ml_pam
|
|||
m_armIKLeft = null;
|
||||
m_armIKRight = null;
|
||||
m_armLength = 0f;
|
||||
m_leftHandParameter = null;
|
||||
m_rightHandParameter = null;
|
||||
}
|
||||
|
||||
void OnAvatarSetup()
|
||||
|
@ -365,6 +370,9 @@ namespace ml_pam
|
|||
SetupArmIK();
|
||||
}
|
||||
|
||||
m_leftHandParameter = new AvatarBoolParameter("LeftHandExtended", PlayerSetup.Instance.animatorManager);
|
||||
m_rightHandParameter = new AvatarBoolParameter("RightHandExtended", PlayerSetup.Instance.animatorManager);
|
||||
|
||||
OnEnabledChanged(m_enabled);
|
||||
}
|
||||
|
||||
|
@ -533,6 +541,11 @@ namespace ml_pam
|
|||
m_armIKRight.solver.IKPositionWeight = (p_state ? 1f : 0f);
|
||||
m_armIKRight.solver.IKRotationWeight = (p_state ? 1f : 0f);
|
||||
}
|
||||
|
||||
if((p_hand == Settings.LeadHand.Left) || (p_hand == Settings.LeadHand.Both))
|
||||
m_leftHandParameter?.SetValue(p_state);
|
||||
if((p_hand == Settings.LeadHand.Right) || (p_hand == Settings.LeadHand.Both))
|
||||
m_rightHandParameter?.SetValue(p_state);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue