File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
server/core/src/main/java/dev/slimevr/tracking Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -534,7 +534,7 @@ class HumanPoseManager(val server: VRServer?) {
534534
535535 // Get the difference between last reset and now
536536 val difference = tracker
537- .getRotation () * tracker.resetsHandler.lastResetQuaternion!! .inv ()
537+ .getRotationNoResetSmooth () * tracker.resetsHandler.lastResetQuaternion!! .inv ()
538538 // Get the pure yaw
539539 var trackerDriftAngle = abs(
540540 (
Original file line number Diff line number Diff line change @@ -412,15 +412,11 @@ class Tracker @JvmOverloads constructor(
412412 }
413413
414414 /* *
415- * Get the rotation of the tracker after the resetsHandler's corrections and filtering if applicable
415+ * Get the rotation of the tracker after the resetsHandler's corrections, filtering,
416+ * and reset smoothing if applicable
416417 */
417418 fun getRotation (): Quaternion {
418- var rot = if (trackRotDirection) {
419- filteringHandler.getFilteredRotation()
420- } else {
421- // Get non-filtered rotation
422- getAdjustedRotation()
423- }
419+ var rot = getRotationNoResetSmooth()
424420
425421 if (yawResetSmoothing.remainingTime > 0f ) {
426422 rot = yawResetSmoothing.curRotation * rot
@@ -429,6 +425,17 @@ class Tracker @JvmOverloads constructor(
429425 return rot
430426 }
431427
428+ /* *
429+ * Get the rotation of the tracker after the resetsHandler's corrections and
430+ * filtering if applicable
431+ */
432+ fun getRotationNoResetSmooth (): Quaternion = if (trackRotDirection) {
433+ filteringHandler.getFilteredRotation()
434+ } else {
435+ // Get non-filtered rotation
436+ getAdjustedRotation()
437+ }
438+
432439 /* *
433440 * Gets the world-adjusted acceleration
434441 */
You can’t perform that action at this time.
0 commit comments