Forum Discussion
bbowler982
4 years agoHonored Guest
OVRInput.get() functions not working
I am trying to write a simple function to get a button click from OVR.Input and the .Get() and .GetDown() functions always return false. The controller works to grab objects with the triggers and the hands and fingers move accordingly in the game so I know the controller is working and getting input. I have the OVRManager script in my scene attached to the OVRCameraRig as well.
This code is placed inside the OVRPlayerControllers Update() function. I am not sure what I am missing.
OVRInput.Update();
OVRInput.FixedUpdate();
if (OVRInput.Get(OVRInput.Button.One))
{
Debug.Log("Input Detected Button One");
if (this.isStanding)
{
this.CameraHeight = 0.5f;
this.isStanding = false;
}
else
{
this.CameraHeight = 2.0f;
this.isStanding = true;
}
}
1 Reply
Replies have been turned off for this discussion
- SSARJHonored Guest
I'm not sure what the OVRPlayerControllers Update() function does but I normaly put the other OVR function inside a normal update or fixed update function hence the need to call OVRInput.Update(); or OVRInput.FixedUpdate();
in their respective loops
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 month ago
- 6 months ago