Search Unity

Oculus Go - Connecting the Remote Controller

Discussion in 'AR/VR (XR) Discussion' started by benvista, Jan 25, 2019.

  1. benvista

    benvista

    Joined:
    Jan 25, 2019
    Posts:
    2
    Hi, I am trying to use Unity to develop for the Oculus Go!

    What I've got working so far:
    - Created a new Unity 2018.2.20f1 project (since the Oculus Integration is not compatible with the latest Unity version) and imported the Oculus Integration from the Unity Asset Store
    - Simple sample scene displaying a basic cube on a basic floor
    - Player can look around using the HMD
    - Added the OVRPlayerController (which includes the OVRCameraRig) to my scene
    - This all works fine on the actual Oculus Go device

    Next, I would like to be able to use the Oculus Go Remote Controller as follows:
    (1) Be able to see the controller's model
    (2) Be able to see the laser beam coming out of the controller (like in the Oculus Main Menu)
    (3) Be able to use the trigger button on the controller to allow the player to move in the direction they are looking

    I have added the "Tracked Remote" prefab under OVRCameraRig > TrackingSpace > RightHandAnchor. This does make the controller appear (1). However, there is no laser beam (2) and I am not sure how to integrate the controller's buttons with the OVRPlayerController (3).

    What do I need to do?
     
    Last edited: Jan 25, 2019
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I don't use the OVRPlayerController, OVRCameraRig, or Tracked Remote prefab; I find they make things more complicated than they need to be.

    But in either case, to move the player around, you need to write some code. The Go community has not settled on what sort of motion is best, and it may depend on what type of game you're making. Teleporting is best for not making your players sick, but smooth (continuous) motion is better for things like first-person shooters (which we already have too many of, so please consider a different genre!). With smooth motion, you can either go in the direction the camera is facing, or go in the direction the controller is pointing; I prefer the latter, but some people in some situations prefer the former.

    As for the laser beam, just add a LineRenderer to your controller model and configure as desired.
     
    gjf likes this.
  3. benvista

    benvista

    Joined:
    Jan 25, 2019
    Posts:
    2
    I have tried that, but I am not sure how to get the line renderer to move together with the controller. As is, the line stays still when the controller moves!
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Your line renderer may be configured in World Coordinates. Switch it to Local coordinates. (That's an option on the line renderer component.)