ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.08k stars 1.28k forks source link

Is Gamepad Alias available for custom drivers? #923

Open AgentMilkshake1 opened 5 years ago

AgentMilkshake1 commented 5 years ago

Gamepad style Single Device only binds/uses alias when corresponding L/R controller turned off or higher priority

The device I am working with is a chair device that tilts, acting as a joystick.

The problem is, whilst acting as a single device, the device does not appear to bind with games and applications as intended.

However, under the following conditions, it will work: If my device identifies as TrackedControllerRole_RightHand or TrackedControllerRole_LeftHand, AND my device either has a high priority, or the corresponding tracked motion controller is turned off (battery removed/totally off).

The problem is, I need all 3 devices to be active at the same time - Custom Device, Left Motion Controller and Right Motion Controller.

This would be a perfect instance for my device to use the Gamepad alias, although I believe the Gamepad's alias is custom special code for a Gamepad?

So I have 2 questions

What is my solution here? Thanks

interfect commented 5 years ago

I ran across this issue when trying to get SteamVR working with OpenHMD on an Oculus DK1 on Linux. The HMD works fine, but there's now way to get input control into SteamVR, because it only supports tracked controllers and its built-in gamepad driver.

I ended up following this tutorial on using xboxdrv to provide a fake xbox controller that the built-in gamepad driver will deign to take events from. You may also be able to use xboxdrv to shim between your device's input signals and the default gamepad driver.

AgentMilkshake1 commented 5 years ago

Hey interfect, please check out the referenced issue "Support for Treadmill devices" #937 as support for Treadmill devices has been added (exactly to my needs and many others).

Hope this helps you!