private void UpdateLatestVelocitiesAndPoseValues(Pose referencePose, float delta) { (_linearVelocity, _angularVelocity) = GetLatestLinearAndAngularVelocities( referencePose, delta); _linearVelocity = _linearVelocityFilter.Step(_linearVelocity); var newReleaseVelocInfo = new ReleaseVelocityInformation(_linearVelocity, _angularVelocity, referencePose.position); WhenNewSampleAvailable(newReleaseVelocInfo); _previousReferencePosition = referencePose.position; _previousReferenceRotation = referencePose.rotation; }
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); }