Godot Version
4.2.1
On Linux using Monado
Question
Lots of hints in the documentation that adding SteamVR trackers into the game ought to be handled somehow but I’m basically stuck not knowing what I’m doing.
The Index Controllers work fine, with XRController3d objects in the scene and the trackers set to “right_hand” or “left_hand”
Monado is reporting that it recognizes the trackers exist as it starts up:
Using builder lighthouse: Lighthouse-tracked (Vive, Index, Tundra trackers, etc.) devices builder
Got devices:
0: Vive HMD
1: HTC Vive Tracker
2: HTC Vive Tracker
3: Valve Index Controller
4: Valve Index Controller
In roles:
head: Vive HMD
left: Valve Index Controller
right: Valve Index Controller
gamepad: <none>
eyes: <none>
hand_tracking.left: Valve Index Controller
hand_tracking.right: Valve Index Controller
Result: XRT_SUCCESS
But still only the XRController3D objects which have “left_hand” or “right_hand” set as their “Tracker” actually show up.
If I iterate though XRServer.GetTrackers on startup it’s only showing the head and two controllers, not the trackers.
The documentation says to “listen for signals”, and I can attach a function to the XRServer.TrackerAdded during the _ready of an object but suspect the XR is already systarted up by then since it gets no signals even for the 3 tracked objects that we can indeed see.
I can create a new XRPositionalTracker and add that manually:
XRPositionalTracker tttracker = new XRPositionalTracker();
tttracker.Type = XRServer.TrackerType.Controller;
tttracker.Hand = Godot.XRPositionalTracker.TrackerHand.Unknown;
tttracker.Name = "/user/vive_tracker_htcx/role/waist";
XRServer.AddTracker(tttracker);
That does call the added handler, but doesn’t actually start any tracking. I don’t really think I’m supposed to be manually adding the trackers though. Here I’m aware I’m not assigning a device-ID to that name either so dunno how it would be supposed to know which of the tracker devices it was tracking.
Can’t listen for button or joystick signals of course because the trackers have no buttons or joysticks.
Has anyone successfully gotten some trackers to work at all?
Or on Linux?
Or with Monado?
Any ideas what I’m supposed to do in order to get the trackers actually moving an object in my scene?
Thanks.