-
-
Notifications
You must be signed in to change notification settings - Fork 993
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(SDK): utilise underlying sdk to retrieve headset type
Previously, the `VRTK_DeviceFinder.GetHeadsetType()` would rely on the built in Unity methods for determining the headset type, however this was unsustainable as it didn't report generic enough information and would mean the list of headset types would grow and grow and ultimately not provide useful information. This has now been changed by each SDK now has a `GetHeadsetType` method that reports a simpler to understand headset type string, so in the case of the vive, it does not report all of the variants, just reports "htcvive" and similarly with the rift. This string is then used to return a new, cleaner enum from the `VRTK_DeviceFinder.GetHeadsetType()` method and the enum is stored in the SDK_BaseHeadset class as it's more appropriate. The usage of `GetHeadsetType` to determine which controller is connected in the SDK_SteamVRController class has been removed and now the render model of the connected controller is used to determine the controller type as this will always be accurate from what OpenVR is reporting. When using the Unity SDK, the headset is still retrieved in the old way as Unity doesn't provide enough decent information about the connected headset to know which device is actually connected. It does this by scraping the model and device name.
- Loading branch information
1 parent
e106b1c
commit 8f61ffb
Showing
15 changed files
with
512 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.