mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 11:29:23 +00:00
Fingers values reset
Hips transform restore after pose modification
This commit is contained in:
parent
7ef112d02c
commit
0440baa84f
5 changed files with 96 additions and 6 deletions
|
@ -232,7 +232,14 @@ namespace ml_lme
|
|||
|
||||
if(PlayerSetup.Instance._animator.isHuman)
|
||||
{
|
||||
Vector3 l_hipsPos = Vector3.zero;
|
||||
Quaternion l_hipsRot = Quaternion.identity;
|
||||
m_hips = PlayerSetup.Instance._animator.GetBoneTransform(HumanBodyBones.Hips);
|
||||
if(m_hips != null)
|
||||
{
|
||||
l_hipsPos = m_hips.localPosition;
|
||||
l_hipsRot = m_hips.localRotation;
|
||||
}
|
||||
|
||||
if(!m_inVR)
|
||||
{
|
||||
|
@ -308,6 +315,12 @@ namespace ml_lme
|
|||
m_vrIK.solver.OnPreUpdate += this.OnIKPreUpdate;
|
||||
m_vrIK.solver.OnPostUpdate += this.OnIKPostUpdate;
|
||||
}
|
||||
|
||||
if(m_hips != null)
|
||||
{
|
||||
m_hips.localPosition = l_hipsPos;
|
||||
m_hips.localRotation = l_hipsRot;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue