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); } } }
private Pose ApplyFilter(Pose pose) { _wristFilter.SetProperties(_wristFilterProperties); pose.position = _wristFilter.Step(pose.position, Time.fixedDeltaTime); return(pose); }