From 2c19f8a6ff7bac978dce50341515c45ec6edb13c Mon Sep 17 00:00:00 2001 From: Butterscotch! Date: Fri, 2 Oct 2026 04:28:58 -0400 Subject: [PATCH] Revert "Use rawAcceleration for Step Mounting" This reverts commit d8e632a979bc5f98802af74e45901c5ce066c2e0. --- .../src/main/java/dev/slimevr/stepmounting/module.kt | 12 +----------- .../src/main/java/dev/slimevr/tracker/reducer.kt | 3 ++- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/server/core/src/main/java/dev/slimevr/stepmounting/module.kt b/server/core/src/main/java/dev/slimevr/stepmounting/module.kt index 1944ce0da..ffb275bae 100644 --- a/server/core/src/main/java/dev/slimevr/stepmounting/module.kt +++ b/server/core/src/main/java/dev/slimevr/stepmounting/module.kt @@ -8,7 +8,6 @@ import dev.slimevr.config.Settings import dev.slimevr.context.Behaviour import dev.slimevr.context.Context import dev.slimevr.tracker.Tracker -import dev.slimevr.tracker.applyCalibration import io.github.axisangles.ktmath.Quaternion import io.github.axisangles.ktmath.Vector3 import kotlinx.coroutines.CoroutineScope @@ -113,18 +112,9 @@ class StepMountingManager( if (activeTrackers.isEmpty()) return emptyList() return activeTrackers.map { controller -> controller to controller.context.state.map { s -> - val accel = s.rawAcceleration ?: error("Trackers will always have acceleration in this case") TrackerSnapshot( rotation = s.rotation, - acceleration = applyCalibration( - accel, - s.rawRotation, - // TODO Stay Aligned does add to the headingCorrection not - // included here, so eventually this should just use - // s.acceleration. - s.sessionCalibration.headingCorrection, - // Leave headingALignment out of the equation - ), + acceleration = s.acceleration ?: error("Trackers will always have acceleration in this case"), ) } } diff --git a/server/core/src/main/java/dev/slimevr/tracker/reducer.kt b/server/core/src/main/java/dev/slimevr/tracker/reducer.kt index 6e9155c4f..446640706 100644 --- a/server/core/src/main/java/dev/slimevr/tracker/reducer.kt +++ b/server/core/src/main/java/dev/slimevr/tracker/reducer.kt @@ -264,8 +264,9 @@ fun reduce( } is TrackerActions.SetStepMounting -> { + val newHeadingAlignment = state.sessionCalibration.headingAlignment * action.headingAlignment state.copy( - sessionCalibration = state.sessionCalibration.copy(headingAlignment = action.headingAlignment), + sessionCalibration = state.sessionCalibration.copy(headingAlignment = newHeadingAlignment), lastMountingMethod = MountingMethod.STEP, needsMountingReset = false, rotationDirty = true,