Пример #1
0
        private void ApplyFilters(HandDataAsset handDataAsset)
        {
            if (_wristFilterEnabled)
            {
                Pose rootPose = handDataAsset.Root;
                _wristFilter.SetProperties(_wristFilterProperties);
                rootPose.rotation  = _wristFilter.Step(rootPose.rotation, Time.fixedDeltaTime);
                handDataAsset.Root = rootPose;
            }

            if (_fingerFiltersEnabled)
            {
                foreach (var joint in _fingerJointFilters)
                {
                    joint.Filter.SetProperties(_fingerFilterProperties);
                    handDataAsset.Joints[(int)joint.JointId] =
                        joint.Filter.Step(handDataAsset.Joints[(int)joint.JointId], Time.fixedDeltaTime);
                }
            }
        }
Пример #2
0
 private Pose ApplyFilter(Pose pose)
 {
     _wristFilter.SetProperties(_wristFilterProperties);
     pose.position = _wristFilter.Step(pose.position, Time.fixedDeltaTime);
     return(pose);
 }