示例#1
0
 void FixedUpdate()
 {
     if (dummyVrik == null)
     {
         return;
     }
     dummyVrik.UpdateSolverExternal();
 }
示例#2
0
 private void SetVRIK(GameObject model)
 {
     vrik = model.AddComponent<VRIK>();
     vrik.solver.IKPositionWeight = 0f;
     vrik.solver.leftArm.stretchCurve = new AnimationCurve();
     vrik.solver.rightArm.stretchCurve = new AnimationCurve();
     vrik.UpdateSolverExternal();
 }
示例#3
0
        private void LateUpdate()
        {
            // VRIK must run before dynamic bones
            _vrik.UpdateSolverExternal();

            // apply dynamic bones
            foreach (BeatSaberDynamicBone::DynamicBone dynamicBone in _dynamicBones)
            {
                if (!dynamicBone.enabled)
                {
                    continue;
                }

                // setting m_Weight prevents the integrated calls to PreUpdate and UpdateDynamicBones from taking effect
                _weightField.SetValue(dynamicBone, 1);
                _updateDynamicBonesDelegate(dynamicBone, Time.deltaTime);
                _weightField.SetValue(dynamicBone, 0);
            }
        }