How to detect which motion controller is connected

Hey all

So unreal has a nifty ‘Get HMD Device Name’ node that returns which headset the user is wearing. From there I am able to change the controls to work with Oculus Touch or Vive wand controllers. But now with the introduction of Knuckle controllers I can’t simply use the HMD device name node anymore, as it only returns the headset and not the controllers.

Is there a way for me to detect which type of controller is connected?

Hello,

I haven’t implemented this myself - but just want to pass some information along:

"If you query the string ETrackedDeviceProperty::Prop_ModelNumber_String from OpenVR (using GetStringTrackedDeviceProperty), you can check the string to identify the controller.

For example some of our code: if(ControllerString.Contains(TEXT(“VIVE Controller”), ESearchCase::IgnoreCase)) { Result = ECoopVrControllerType::ViveWand; }

Note, don’t check full strings, that substring works on Vive and Vive Pro for example.

We do not use this method for Oculus - we run Oculus using their native plugin which uses a different approach. Oculus running through SteamVR will return something in those strings, but I don’t know if it will identify the controllers.

Using the Oculus API direct allows us to identify between “Touch” and “Touch for Rift S” - but requires a newer Oculus SDK than is in 4.22 (So the Oculus branch for now). That matters to us as they have the exact same input mapping, but for showing a model in tutorials etc, we need to know which the player has."