Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds supports for Vive trackers to our OpenXR implementation.
HTC trackers are small tracked devices that can track arbitrary locations. You can attach a tracker to peripheral like a gun or keyboard and track its location in space, or you can attach one or more trackers to set locations on your body to enable full body tracking. For this purpose it is important that you pair all the trackers in SteamVR and then identify the usage of each tracker.
This you do by opening the menu in your SteamVR status window and selecting
Settings
. In the settings window go toControllers
and thenMANAGE TRACKERS
. A dialog similar to the following will open up:In this screenshot only one tracker is active and it is identified as tracking the location of a keyboard.
In Godot you need to make sure the action map is setup, if you're using the default action map but have an older version, just delete it and once you run your project an updated map is created. Else you need to manually add the entries:
You can add an
XRController3D
node for the tracker underneath yourXROrigin3D
node like so:Note how in the inspector the tracker is set to the correct input path, in our case
/user/vive_tracker_htcx/role/keyboard
. All the possible trackers roles are now available in the dropdown. Just add controller nodes for each tracker you wish to support.In the example we're simply showing a mesh of the tracker body:
A demo project showcasing this functionality can be found here: BastiaanOlij/godot4_openxr_demo#6