mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-04 19:09:23 +00:00
More stable ragdoll
This commit is contained in:
parent
6d13ff1894
commit
c887eacc6a
1 changed files with 5 additions and 0 deletions
|
@ -266,6 +266,7 @@ namespace ml_prm
|
||||||
// And return back
|
// And return back
|
||||||
m_puppetRoot.localPosition = Vector3.zero;
|
m_puppetRoot.localPosition = Vector3.zero;
|
||||||
m_puppetRoot.localRotation = Quaternion.identity;
|
m_puppetRoot.localRotation = Quaternion.identity;
|
||||||
|
m_puppetRoot.gameObject.SetActive(false);
|
||||||
|
|
||||||
m_vrIK = PlayerSetup.Instance._avatar.GetComponent<VRIK>();
|
m_vrIK = PlayerSetup.Instance._avatar.GetComponent<VRIK>();
|
||||||
if(m_vrIK != null)
|
if(m_vrIK != null)
|
||||||
|
@ -423,6 +424,8 @@ namespace ml_prm
|
||||||
foreach(var l_link in m_boneLinks)
|
foreach(var l_link in m_boneLinks)
|
||||||
l_link.Item2.CopyGlobal(l_link.Item1);
|
l_link.Item2.CopyGlobal(l_link.Item1);
|
||||||
|
|
||||||
|
m_puppetRoot.gameObject.SetActive(true);
|
||||||
|
|
||||||
foreach(Rigidbody l_body in m_rigidBodies)
|
foreach(Rigidbody l_body in m_rigidBodies)
|
||||||
l_body.isKinematic = false;
|
l_body.isKinematic = false;
|
||||||
|
|
||||||
|
@ -457,6 +460,8 @@ namespace ml_prm
|
||||||
if(BodySystem.isCalibratedAsFullBody)
|
if(BodySystem.isCalibratedAsFullBody)
|
||||||
BodySystem.TrackingPositionWeight = 1f;
|
BodySystem.TrackingPositionWeight = 1f;
|
||||||
|
|
||||||
|
m_puppetRoot.gameObject.SetActive(false);
|
||||||
|
|
||||||
foreach(Rigidbody l_body in m_rigidBodies)
|
foreach(Rigidbody l_body in m_rigidBodies)
|
||||||
l_body.isKinematic = true;
|
l_body.isKinematic = true;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue