ValveSoftware / openvr

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

Controller in mouse input mode #603

Closed elect86 closed 7 years ago

elect86 commented 7 years ago

I see from the openvr.h

/** when in mouse input mode you can receive data from the touchpad, these events are only 
     sent if the users finger is on the touchpad (or just released from it) 
**/

How can I set the controller in mouse input mode? Does this have anything to do with overlays?

bddckr commented 7 years ago

Yep (getter and setter), search the same header for "mouse" and find it talking about "simulated mouse events in overlay space".

elect86 commented 7 years ago

Thanks Christopher, I managed somehow to get a basic sample working..

And what about the touchpad? is there a way to get the position of the user finger on it without an overlay?

JoeLudwig commented 7 years ago

These events are sent to overlays with the VROverlayFlags_SendVRTouchpadEvents flag set. If you want to interpret the touchpad as mouse input outside the context of an overlay, you'll need to do that from the raw input data in GetControllerState.

elect86 commented 7 years ago

Clear, thanks!