Skip to main content
Up and Coming
July 21, 2015

Practical UNITY \ VR Dev Tricks

While developing for the DK2 Iv gotten proficient at holding the DK2 up in one hand and moving the character with the keyboard\gamepad with the other hand. I can get a quick test of changes to my game without donning the HMD.

Anybody else have interesting tips or tricks to working with the DK2 for long hours in the real world?

Im half tempted to mount the DK2 to a welders mask so I can flip it up and down quickly.. lol
    This topic has been closed for replies.

    2 replies

    Up and Coming
    July 21, 2015
    That idea on the welder's mask.
    Not bad at all. Great idea actually.
    Keep up these hints of yours!
    Thanks.
    Up and Coming
    July 22, 2015
    DEV TRICK: Map RECENTER to the XBox Controller

    I map the Recenter position tracking to XBox Controller Right Joystick button then I don't need to find the keyboard when it's out of reach.

    Here's my script:

    // Recenter input mapping for VR by Peter Koch <peterept@gmail.com>
    using UnityEngine;
    using UnityEngine.VR;
    using System.Collections;

    // To use:
    // 1. Drag this script onto any game object
    // 2. Map "Recenter" in the input manager to use XBox Right Joystick Button and 'r' key:
    // Ref: http://blogs.msdn.com/b/nathalievangelist/archive/2014/12/16/joystick-input-in-unity-using-xbox360-controller.aspx
    // Edit -> Project Settings -> Input, and insert a new item and name it "Recenter":
    // Positive Button: "r"
    // Alt Positive Button: "joystick button 9"
    // Type: Key or mouse button
    public class VRRecenter : MonoBehaviour
    {
    void Update ()
    {
    if (Input.GetButtonDown("Recenter"))
    {
    Debug.Log("VR Recenter");
    InputTracking.Recenter();
    }
    }
    }
    Check out my Unity VR development blog: http://talesfromtherift.com @peterept