Oculus Connect 4 will feature more than 30 sessions across four tracks: Develop, Design, Distribute, and Future.

We kick things off with a keynote address on October 11!
New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

Need help: problem in OVRInput

vdergowvdergow Posts: 3
Virtual Boy (or Girl)
I encountered a problem when using OVRInput component as described in this article (Unity's UI System in VR: https://developer3.oculus.com/blog/unitys-ui-system-in-vr/ ).

When using OVRInput component, if I click on a button and then move the gaze pointer away from this button, the button will not lose focus. So when I click on any other location in the scene, the previous button will be clicked first. When using trigger to change animation state, it will cause a problem, the animation will be played twice.

For example, in the following pictures:

1. First, move the gaze pointer on button "Roar", the button gets the focus and turns red, then click the button.

2. Move the gaze pointer away from button "Roar", but the button "Roar" is still in focus(red).

3. Click on any another location, such as button "Rock", then the button "Roar" will be clicked first.

This problem does not occurs when using Virtual Mouse Pointer mentioned in the article. Because virtual mouse will trigger click event when release the mouse button, but not when press the mouse button. But if I use Oculus Touch or Keyboard, both key press and release will trigger a click event, that means click event will be triggered twice.
I think virtual mouse is handled correctly.

I've been working on game programming for a little time, and don't know how to modify the code in "OculusSampleFramework.unitypackage". I hope Oculus can fix this problem and release a new sample.

Sign In or Register to comment.