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

Oculus Go Controller Not Showing Up

Discussion in 'VR' started by Schneider21, Apr 4, 2019.

  1. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Just getting started with my Oculus Go, and trying to port a project I had prototyped with Daydream.

    I've got the OVRPlayerController in and working in my scene, but I can't seem to get the controller to show up. The resources I've found say to add the TrackedRemote prefab as a child of both hand anchors, which I've done, but this alone doesn't seem to work.

    upload_2019-4-4_16-30-15.png

    Am I missing something obvious here, or does the TrackedRemote prefab not do what I assumed it does?
     
    JoeStrout likes this.
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I don't know, because while I do a ton of Go development these days, I don't use the Oculus prefabs or sample code. They may everything much more complicated than it should be.

    Here's my standard setup:

    upload_2019-4-4_14-8-28.png

    Player is just a GameObject that acts as the root transform for wherever the player is. You would move this around if you want the user to move around in the world, and rotate it if you implement a snap-turn (say, in response to a swipe on the thumb disc — users who prefer to play seated rather than standing are pretty insistent on this).

    Main Camera is the main camera. You don't need any scripts or anything else there; it rotates automatically. Indeed, the default "Sample Scene" Unity gives you when you create a new project works just fine in VR for looking around. I added a mouse-rotation script for use when testing within the IDE, but that's strictly a nicety for testing.

    ControllerHolder is also there for testing, and it _also_ has a mouse-rotation script (using different modifier keys) for testing in the IDE. Otherwise, it wouldn't be needed at all. And then under that, Controller is the transform that moves around as the user waves their controller. Inside that you put whatever visual objects you want; in this case, that's the Beatron disc and glove, plus some other stuff (GUIBeam, etc.) that I activate during menu interaction or whatever. When you're starting out, you should just stick a cube in there and make sure you can wave it about.

    How do you wave it about? This does require a little code, but it's not hard. Have a script somewhere that, on Update, sets the local rotation of that Controller object according to OVRInput.GetLocalControllerRotation, and sets local position by OVRInput.GetLocalControllerPosition. That's it.

    So my suggestion: throw out all that nonsense, make a simple set-up like above, and get on with it. (And, be sure to join us on the GOmmunity Discord!)
     
    gjf and Schneider21 like this.
  3. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Thanks, @JoeStrout. I'll give this a try.

    I joined the Discord a couple weeks ago in anticipation of my boss buying the Go for me. Haven't had much reason to participate yet, but you'll be seeing me around now!
     
    JoeStrout likes this.