Beispiel #1
0
        private void Start()
        {
            _vrikManager  = GetComponentInChildren <VRIKManager>();
            _dynamicBones = GetComponentsInChildren <BeatSaberDynamicBone::DynamicBone>();

            _vrik = _ikHelper.InitializeVRIK(_vrikManager, transform);

            _fixTransforms      = _vrikManager.fixTransforms;
            _vrik.fixTransforms = false; // FixTransforms is manually called in Update

            foreach (TwistRelaxer twistRelaxer in _twistRelaxers)
            {
                twistRelaxer.ik      = _vrik;
                twistRelaxer.enabled = true;
            }

            if (_vrikManager.solver_spine_maintainPelvisPosition > 0 && !_input.allowMaintainPelvisPosition)
            {
                _logger.Warning("solver.spine.maintainPelvisPosition > 0 is not recommended because it can cause strange pelvis rotation issues. To allow maintainPelvisPosition > 0, please set allowMaintainPelvisPosition to true for your avatar in the configuration file.");
                _vrik.solver.spine.maintainPelvisPosition = 0;
            }

            _input.inputChanged += OnInputChanged;

            UpdateSolverTargets();
            SetLocomotionEnabled(_avatar.isLocomotionEnabled);
        }
Beispiel #2
0
        public void Start()
        {
            IKHelper ikHelper = new IKHelper(new EditorLoggerProvider());

            ikHelper.InitializeVRIK(transform.GetComponentInChildren <VRIKManager>(), transform);
        }
        public void Start()
        {
            IKHelper ikHelper = new IKHelper(new UnityDebugLogger <IKHelper>());

            ikHelper.InitializeVRIK(transform.GetComponentInChildren <VRIKManager>(), transform);
        }