Forum Discussion

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

How do you add more XBOX Buttons support when the product only has support for movement?

I got a product for making VR game. it has a character controller with a body. you can walk/run and rotate but that's about it. It is not based on OVR utilities  So can't do the if (OVR.Input etc).

Do i have to map the buttons using the Edit/Project Setttings/Input Manager?
and then to check i would do if( Input.getButton(Button.three) )  etc etc?

is that how it works?
  • That sounds like a good approach. OVRPlayerController is considered a template for you to modify as needeed. If you really don't want to change it, you can always wrap the protected members with public ones in the derived class.

2 Replies

Replies have been turned off for this discussion
  • You can add checks in say the "update() function for the OVR input etc. You need to have the OVR manager in your scene usually.

    I just started with the OVR unity utilities package. And then go from there. It has examples of how to deal with input etc. (jump and run etc) . If you take the functionality of say the third person controller (Ethan) and drop it into the OVR player controller then you get an animated avatar.

    Its pretty easy to setup

    I have a custom player controller that inherits from the OVR controller (tho I had to make a lot of the protected attributes public to share them ...is that the correct way to do it..I wish I could inherit without modifying the origin OVR script). I overload some of the functions to suit my requirements. In particular the movement and input ones.

    If you are starting from a different character package it may be more difficult. I guess you can jsut add the OVR camera rig (that comes with OVR manager attached usually) Then you can start calling OVR.input


  • vrdaveb's avatar
    vrdaveb
    Oculus Staff
    That sounds like a good approach. OVRPlayerController is considered a template for you to modify as needeed. If you really don't want to change it, you can always wrap the protected members with public ones in the derived class.