The great thing about VR Development becoming more mainstream, is that aside from large companies releasing some pretty nice SDKs to use their own hardware, we are seeing more and more open source projects coming from super talented developers, shortening prototyping time for projects by an order of magnitude.
I'd started to implement some controller physics for my HTC Vive, when a quick search online found 2 handy existing resources.
NewtonVR (website) and (Github). The guys at Tomorrow Today Labs open-sourced this toolkit under a Creative Commons license for use by the community. The toolkit is focused on manipulating scene objects with the Vive controller.
Rather than just jumping in and using the code, I'd highly recommend reading the introductory post about Physics-based interaction on the vive, here.
SteamVR Unity Toolkit (Github)
This toolkit covers a broader range of use-cases. The developer (thestonefox) initially started it as a replacement for the SteamVR Plugin, while it's a super useful starting point, there were some bugs and convoluted ways of doing things, while the code was available within the plugin, I'm not sure if there was a license to continue public modifications openly.
The set of scripts provides functionality such as:
- Controller events
- Using the controller as a laser pointer
- Using the controller to interact with physical objects (as per NewtonVR)
- Teleportation (a la 'The Lab' Valve demo)
I'll be trying out both of these libraries in then next few days in some prototype projects, and report back.