SteamVR Unity Plugin
Quickstart
There's a quickstart guide here that will lead you through the process of getting setup with the SteamVR Unity Plugin and into a scene.
Render Models
SteamVR works with a wide array of headsets and controllers. When you have a tracked device in VR it’s nice to have an accurate visualization of that device. Instead of shipping each individual model and texture for each controller with each application, SteamVR can manage this for you. We include a SteamVR_RenderModel component that you can put on a gameobject that will auto load whatever device SteamVR detects for a given Pose. Put a SteamVR_Behaviour_Pose on a gameobject to get the position and rotation of a controller and then a SteamVR_RenderModel to show the 3d model for that controller that will animate with button presses. See the simple sample scene or the SteamVR/Prefabs/CameraRig prefab for an example.
SteamVR Input
Since SteamVR works with so many different input devices we’ve simplified the process of accommodating all these devices. Instead of referencing the individual buttons on one controller, with SteamVR Input you reference an action. Instead of writing the code to recognize "pulling the trigger button down 75% of the way to grab the block" you can now just focus on the last bit of that, "grab the block". You still configure the default for what "grab" means but the user can rebind it to their preference in a standard interface. And when a new input device comes out your users can publish bindings to share for that device with no code changes on your end.
Skeleton Input
Inline with the Knuckles Valve has released a system to get skeletal hand data independent from the controller you’re using. Some controllers have a high fidelity for hand tracking data with individual joints, some controllers only have buttons that we use to approximate joint data. We use whatever is available and give you two major sets of data:
- With Controller: Our best approximation of where the joints in your hand are wrapped around your controller in the real world.
- Without Controller: Based on the With Controller data we estimate how open or closed your hand is as if you were trying to hold your hand flat or make a fist.
Included in this plugin are example models of gloves that you can freely use in your products. In addition we have a helper component that takes the data from SteamVR and applies it to these gloves: SteamVR_Behaviour_Skeleton. For an example of this in action see the Interaction System sample scene.
Interaction System
After Valve released The Lab we took the learnings from that project and created an Interaction System that others could use in their own projects. This system has been updated since then to use SteamVR Input and the new SteamVR Skeleton Input systems. This system can serve as an example of how to use the these new systems. It includes the following examples:
- Interaction with Unity UI elements
- Pickup, Drop, and Throw
- Multiple variations on throwing velocities
- Bow and Arrow
- Wheel interactions
- Proximity button
- Variety of Skeleton Input examples
- Teleporting
- Using held objects
- Using Skeleton Input to form a hand around a held object.