08-26-2021 01:34 AM
Stack:
I have a Unity scene with a VR interface composed by a Canvas (World Space coordinates) and two buttons. The canvas has attached an OVR Raycaster objects which uses a laser pointer.
The strange thing is that both OnPointerEnter and OnPointerClick get called when I point the button with the laser and click. Just hovering the doesn't trigger any event (nor OnPointerExit or OnPointerEnter).
anyone got the same problem?
07-26-2022 12:31 PM
Is is the same problem as this one?
I followed the directions posted there, and it starts to solve the problem.
You have to add this code inside the OVRInputModule class, in OVRInputModule.cs:
protected override void ProcessMove(PointerEventData pointerEvent)
{
var targetGO = pointerEvent.pointerCurrentRaycast.gameObject;
HandlePointerExitAndEnter(pointerEvent, targetGO);
}
It does not completely solve my problems with the pointer running on Oculus Quest, but it is a step in the right direction.