mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-06 08:42:32 -08:00
Start driver trackers with non-null position
This commit is contained in:
1 parent
9a3c5ab1d6
commit
7fe01747d0
1 file changed
+4
-2
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user