From 7fe01747d0ab8282c641ced58c2736757053d8d4 Mon Sep 17 00:00:00 2001 From: Erimel Date: Mon, 5 Oct 2026 13:59:49 -0400 Subject: [PATCH] Start driver trackers with non-null position --- .../src/main/java/dev/slimevr/solarxr/driver/incoming.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/core/src/main/java/dev/slimevr/solarxr/driver/incoming.kt b/server/core/src/main/java/dev/slimevr/solarxr/driver/incoming.kt index e63481cb5..eec388e3e 100644 --- a/server/core/src/main/java/dev/slimevr/solarxr/driver/incoming.kt +++ b/server/core/src/main/java/dev/slimevr/solarxr/driver/incoming.kt @@ -137,8 +137,9 @@ class DriverIncomingTrackersBehaviour( ) server.context.dispatch(VRServerActions.NewDevice(deviceId, device)) - val offset = DISPLAY_NAME_TO_OFFSET[req.displayName] ?: BODY_PART_TO_OFFSET[req.bodyPart] val trackerId = server.nextHandle() + val offset = DISPLAY_NAME_TO_OFFSET[req.displayName] ?: BODY_PART_TO_OFFSET[req.bodyPart] + rotationOffsets[trackerId] = offset?.rotationOffset ?: Quaternion.IDENTITY val tracker = Tracker.create( scope = scope, id = trackerId, @@ -152,7 +153,8 @@ class DriverIncomingTrackersBehaviour( driverName = driverName, appContext = appContext, ) - rotationOffsets[trackerId] = offset?.rotationOffset ?: Quaternion.IDENTITY + // Start with non-null position + tracker.context.dispatch(TrackerActions.SetRotation(null, null, null, Vector3.ZERO, false)) server.context.dispatch(VRServerActions.NewTracker(trackerId, tracker)) receiver.sendDriverMessage(