Search Unity

Emulate/control HMD in Unity editor when developing?

Discussion in 'AR/VR (XR) Discussion' started by nicmarxp, May 28, 2018.

  1. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    I just started experimenting with my Vive and the new Lightweight Render Pipeline for VR. It worked out of the box, great job Unity! Just one thing, the controllers didn't seem to work. I noticed that I hade to add an object as a child to Left/Right hand, and then it worked fine.

    However, if I switch to the Scene tab during gameplay, it stops tracking both HMD and Controllers. Why is this? I'd still like to have an overview of the Scene when developing.

    Also, I'd like to be able to switch to a manual control of the camera, like WASD/mouse and possibly even use the mouse (like a gaze input + mouse click) to interact with things in the scene, to avoid having to use the HMD and controllers to test each thing.

    Does anyone have any ideas or scripts on how to do this up? I think it would save some time without putting on/off the HMD for each test.

    Thanks!
     
  2. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    I was considering just having an extra camera that I can switch to with a key press, and that one can be flied using WASD. That should work right?

    Also the scene view works and updates when it’s not in the same tab group as game. As soon as i dragged it away it started working as expected.
     
  3. markjanzen88

    markjanzen88

    Joined:
    May 31, 2017
    Posts:
    68
    if you use the steam vr sdk, you can test basic interaction with the mouse without needing the hmd connected. basically, the way the steam vr camera prefab works is if it doesnt detect a hmd plugged in, it will default to a standard camera.
     
  4. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    Aha cool thanks, didn’t know that! Will try it out :)