Skip to content

Commit e108e0e

Browse files
committed
Add info on using buttons/analogs.
1 parent 88194d8 commit e108e0e

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

OSVR-Unity/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ You need exactly one instance of `OSVR.Unity.ClientKit` in your project: get one
1515
### Tracking
1616
For trackers (Pose, Position, Orientation), there are prefabs of nodes that update their transform accordingly. You'll need to set the path you want to use. Please see the C/C++ documentation for client apps to find valid interface paths. (Note that the OSVR-Unity package handles normalization of the coordinate system to the Unity standard: ignore the one seen in the C++ documentation.)
1717

18+
### Manually handling callbacks
19+
This involves two pieces:
20+
21+
- Adding an `OSVR.Unity.InterfaceGameObject` script component, in which you can specify the path. There is a prefab for this.
22+
- Adding your own script component (which should inherit from `OSVR.Unity.InterfaceBase` instead of `MonoBehaviour` for simplest usage) that uses the `InterfaceGameObject` to register a callback.
23+
24+
Examples for buttons and analog triggers are included in the `minigame` scene.
25+
1826
### Other interaction
1927
Any other interaction with the OSVR framework goes directly through the Managed-OSVR (.NET) wrapper without any Unity-specific adaptations. See that source for examples of button and analog callbacks, as well as display parameter access (ideally used to set up the display properly. In terms of API, the Managed-OSVR API is effectively a direct translation of the C++ wrappers of OSVR `ClientKit`, so please see the main OSVR-Core client documentation for more information.
2028

21-
There is a prototype of a more Unity-adapted button callback - it does not presently work, but your assistance in fixing it would be greatly appreciated!
22-
2329
### Execution
2430
A standalone player built for Windows may end up needing the `-adapter N` argument, where `N` is a Direct3D display adapter, to put the rendered output on the HMD display.

0 commit comments

Comments
 (0)