Fix Skeleton preview and other fixup

This commit is contained in:
Erimel committed 2026-09-23 20:58:24 -04:00
1 parent 2fc6810043
commit 1dc9127fa6
4 files changed
+8 -7

No files matched your search

@@ -168,13 +168,13 @@ fun reduce(
}
is TrackerActions.PoseMountingReset -> {
val referenceRotation = action.referenceRotation ?: state.rotation
// Positional trackers' heading is aligned on full reset, not on mounting reset, except for a reference.
val alignHeading = state.position == null || action.referenceRotation == null
// A positional reference tracker needs to correct its heading on mounting reset.
val correctHeading = state.position != null && action.referenceRotation == null
val referenceRotation = action.referenceRotation ?: state.rotation
val headingAlignment = if (alignHeading) {
estimateHeadingAlign(
state.rawRotation,