This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
GVR Event system needs some work #916
Open
Description
Summary: The OnPointerEnter, Exit, Hover and Click events do not perform as one would expect and the event system is built in such a way that gestures cannot easily be defined.
Found using:
- Google VR SDK version: 1.130.1
- Unity version: 2018.1
- Phone manufacturer, model, and O/S version: Google Pixel
- Viewer manufacturer & model: Google Daydream (v1 I guess)
Steps to reproduce the issue:
- Remove the controller pointer and instead set the DemoInputManager Controller Pointer to the GvrReticlePointer (I want gaze pointing)
- Use HelloVR example and attempt to hook into the OnPointerEnter and Exit events with each handler logging out to Debug console.
- Observe just how few events are generated for enter & exit (1 enter, no exits) despite the number of times you point at any object in the scene or move the pointer around.
- Try other mechanisms such a building a class that extends the Reticle Pointer and overriding the event methods - only OnPointerHover() gets called with any frequency regardless of how many objects you look at.
Workarounds: There are none. It's borked
Additional comments: The API is difficult to extend due to the use of inheritance instead of has-a composition. For what is basically a raycast mechanism, this is overly complicated. I'm going to have to write my own.