Skip to content

Instantly share code, notes, and snippets.

@gomez-addams
gomez-addams / SteamVR_FirstPersonController.cs
Created May 9, 2016 18:10 — forked from thestonefox/SteamVR_FirstPersonController.cs
A Unity3d 5.3 script to add SteamVR functionality such as object interaction/grabbing/throwing, laser pointer and teleport movement with blink (Requires Unity SteamVR plugin)
//=============================================================================
//
// Purpose: Add player ability on SteamVR CameraRig to:
//
// * Trackpad press down: project laser pointer from Touch Controller
// * Trackpad release: teleport player with blink to laser point destination
// * Trigger click: grab any object that has a custom "Grabbable" tag applied
// * Trigger release: release the current grabbed object with relative force
// * Application Menu: reset the position of last grabbed object to controller
//