Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Google Cardboard: Standalone Alt-Mouse Movement With CardboardMain

Discussion in 'AR/VR (XR) Discussion' started by RetroAsgardian, Apr 4, 2016.

  1. RetroAsgardian

    RetroAsgardian

    Joined:
    Dec 10, 2015
    Posts:
    2
    I am making a 3D "desktop environment" (It's more of a 3D workspace with built-in apps and a kinda-sorta-window-manager thing) with Unity that is compatible with Google Cardboard. When I make a manual Alt-Mouse Movement script and put it on the Main Camera in CardboardMain, it works but the GazeInputModule won't. I think the problem is that the GazeInputModule isn't tracking it. I've tried putting it on Main Camera Left/Right and then putting it on CardboardHead, but it still doesn't work! Can somebody PLEASE help me get Alt-mousing to work with the GazeInputModule? I want Alt-mousing so that people who don't want to use Cardboard can navigate around the 3D UI and select Desktop Mode (which disables VR)!

    EDIT: I put it on the CardboardMain and it works, but my code doesn't have a head-neck algorithm. How would I add a head-neck algorithm to the rotation code?
     
    Last edited: Apr 5, 2016
  2. RetroAsgardian

    RetroAsgardian

    Joined:
    Dec 10, 2015
    Posts:
    2
    I have attached my code here. The VRMouseLook.cs file is a modified version of the code here.
    EDIT: The only difference between the original code and my modified VRMouseLook.cs code is that I have deleted the #if UNITY_EDITOR and #endif so it works in standalone.
     

    Attached Files:

    Last edited: Apr 5, 2016