Skip to content

Sample Code

Cory Corvus edited this page May 19, 2020 · 9 revisions

Unity Sample Code

Detect VR HMD and controller

Link

Reset head position

Link

Detect system button press (SteamVR Overlay) and enable/disable gameobject

Link

Get VIVE controller trigger full down/click

Link

Simple Laser Pointer

Link

Move objects to hand's position

Link

VR Player Controller

Link

Video Tutorial

Subscribe to Action (SteamVR 2.x)

public void SubscribeToPlayerAction(SteamVR_Action_Boolean action, SteamVR_Action_Boolean.ChangeHandler onAction)
{
    action.AddOnChangeListener(onAction, SteamInputSource); //SteamInputSource can be Left Right or Any
}

Poll Action (SteamVR 2.x)

Unreal Engine Sample Code

VIVE Tracker without HMD in Unreal Engine

Link

Clone this wiki locally