void FixedUpdate() { if (dummyVrik == null) { return; } dummyVrik.UpdateSolverExternal(); }
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(); }
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); } }