public void OnRelease()
 {
     joint.damper    = originalDamper;
     joint.spring    = originalSpring;
     joint.useSpring = true;
     joint.target    = joint.GetValue();
 }
Пример #2
0
        private void FixedUpdate()
        {
            float num = joint.GetValue();

            value.SetValue(num);
            if (joint.minValue != joint.maxValue)
            {
                float num2 = Mathf.InverseLerp(joint.minValue, joint.maxValue, num);
                if (signedOutput)
                {
                    num2 = num2 * 2f - 1f;
                }
                valueNormalized.SetValue(num2);
            }
        }
Пример #3
0
 public override float GetValue()
 {
     return(jointA.GetValue() + jointB.GetValue());
 }
Пример #4
0
 private float GetActualPosition()
 {
     return(joint.GetValue());
 }