Dedicated BTKUILib page

Internal settings and UI rework
Upcoming mod support
This commit is contained in:
SDraw 2023-04-29 03:18:45 +03:00
parent 0440baa84f
commit 6d13ff1894
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
12 changed files with 269 additions and 154 deletions

View file

@ -76,7 +76,6 @@ namespace ml_prm
m_customTrigger = MovementSystem.Instance.proxyCollider.gameObject.AddComponent<RagdollTrigger>();
Settings.SwitchChange += this.SwitchRagdoll;
Settings.MovementDragChange += this.OnMovementDragChange;
Settings.AngularDragChange += this.OnAngularDragChange;
Settings.GravityChange += this.OnGravityChange;
@ -92,7 +91,6 @@ namespace ml_prm
m_customTrigger = null;
}
Settings.SwitchChange -= this.SwitchRagdoll;
Settings.MovementDragChange -= this.OnMovementDragChange;
Settings.AngularDragChange -= this.OnAngularDragChange;
Settings.GravityChange -= this.OnGravityChange;
@ -224,10 +222,6 @@ namespace ml_prm
l_options.joints = RagdollCreator.JointType.Character;
BipedRagdollCreator.Create(m_puppetReferences, l_options);
// And return back
m_puppetRoot.localPosition = Vector3.zero;
m_puppetRoot.localRotation = Quaternion.identity;
Transform[] l_puppetTransforms = m_puppetReferences.GetRagdollTransforms();
Transform[] l_avatarTransforms = l_avatarReferences.GetRagdollTransforms();
for(int i = 0; i < l_puppetTransforms.Length; i++)
@ -269,6 +263,10 @@ namespace ml_prm
}
}
// And return back
m_puppetRoot.localPosition = Vector3.zero;
m_puppetRoot.localRotation = Quaternion.identity;
m_vrIK = PlayerSetup.Instance._avatar.GetComponent<VRIK>();
if(m_vrIK != null)
{