Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Moving with controllers in Unity VR

Discussion in 'VR' started by KenniKure, Aug 9, 2019.

  1. KenniKure

    KenniKure

    Joined:
    Aug 7, 2019
    Posts:
    39
    Hey Forum.

    I couldnt get the controllers to work or show in Unity VR using the Oculus goggles and controllers. I have a 3D rendering, where I have a script/code written, whereas if I tilt my head in a 30 degree angle, I will move forward.

    This is a great way to move around since I couldnt get the controllers to show (I could not see them in Unity game mode) or work. I am now facing the problem, that I also want to use the controllers to be an option to move in the 3D landscape I have.

    How can I do that? I guess I need to add them somehow and somewhere, and probably write a script that includes them?

    upload_2019-8-9_10-3-21.png
    I have the movement script in CenterEyeAnchor, where if I tilt the VR goggles 30 degrees I move.
    I guess I need the Left and Right hand controller in the scene tree? And maybe Local Avatar?
    The question is, if the controllers and moving with them will work, now that I have the other script?

    Thanks

    Kenni
     
  2. V-J

    V-J

    Joined:
    Apr 1, 2015
    Posts:
    73
    You have to add the OVRPlayerController instead of the OVRCameraRig.
    Something like this.

    upload_2019-8-9_11-56-34.png
     
  3. KenniKure

    KenniKure

    Joined:
    Aug 7, 2019
    Posts:
    39
    I have added the OVRPlayerController now. I found a guide online, that said that I need to add "TrackedRemote" under left and righthandanchor, but I dont have this prefab?
     
unityunity