Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
ryangoldberg's avatar
ryangoldberg
Honored Guest
9 years ago

Unity "game"

Hi, So I'm kinda new to coding and I'm working on a project in Unity with the Oculus. I've plugged in the basic camera and character controller for the Oculus and everything works great. Although I would like to have the controller or mouse be able to look up and down at the same time as using the Oculus similarly to how they allow you to move side to side.

Thanks!

8 Replies

Replies have been turned off for this discussion
  • Did you use the prefab in the Oculus utilities? it should already have both

  • js2k said:

    Did you use the prefab in the Oculus utilities? it should already have both

    I am using the prefab, but I dont see the option for that anywhere :(
  • I think by default vertical look is disabled since its very unpleasant when combined with head tracking. Not sure if there's a way around it

  • MikeF said:

    I think by default vertical look is disabled since its very unpleasant when combined with head tracking. Not sure if there's a way around it

    I guess, I gotta see it for myself. I'm gonna have a tv next to the Oculus to display the same thing in case somebody doesn't want to put it on so I need this axis of movement, I can't even seem to find it in the code for the prefab controller.
  • In that case i'd recommend having two prefabs, then when mouse input is detected just disable the oculus input and enable the mouse input

  • MikeF said:

    In that case i'd recommend having two prefabs, then when mouse input is detected just disable the oculus input and enable the mouse input


    Hmm, interesting, how would that be done?
  • Well there's quite a few ways, but the easiest in your case would be to add a mouse controller script to your camera/player prefab, then have a script attached that will detect mouse input. Once input is detected set vrSettings.enabled = false, then enable your mouse controller logic

  • MikeF said:

    Well there's quite a few ways, but the easiest in your case would be to add a mouse controller script to your camera/player prefab, then have a script attached that will detect mouse input. Once input is detected set vrSettings.enabled = false, then enable your mouse controller logic

    hmmm, that seems like a workable solution, could you show me how that would look? like I said I'm pretty new to coding.