Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by vrzone-io · Mar 18, 2020 at 08:52 AM · oculus

Detecting hovering on button event on Oculus Quest (Unity3D)

Stack:

Oculus Quest Unity 2019.3 Oculus VR Integration macOS Catilina 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. Overall it works well, but when I try to intercept the event produced by hovering the laser pointer on the button, I can get only the click event.

I'm using the following script (attached to the button):

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.EventSystems;
 public class VRButton : MonoBehaviour, IPointerEnterHandler, IPointerClickHandler, ISelectHandler
 {
     // Start is called before the first frame update
     void Start()
     {
 
     }
 
     // Update is called once per frame
     void Update()
     {
 
     }
 
     public void OnPointerEnter(PointerEventData eventData)
     {
         Debug.Log("Enter!");
         transform.localScale *= 1.2f;
     }
 
     public void OnPointerExit(PointerEventData eventData)
     {
         Debug.Log("Exit!");
         transform.localScale /= 1.2f;
     }
 
     public void OnPointerClick(PointerEventData eventData)
     {
         Debug.Log("Clicked!");
     }
 }

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).

This is my ADB log:

 03-15 22:59:53.085 13339 13355 I Unity   : Clicked!
 03-15 22:59:53.085 13339 13355 I Unity   : UnityEngine.Logger:Log(LogType, Object)
 03-15 22:59:53.085 13339 13355 I Unity   : UnityEngine.EventSystems.EventFunction`1:Invoke(T1, BaseEventData)
 03-15 22:59:53.085 13339 13355 I Unity   : UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
 03-15 22:59:53.085 13339 13355 I Unity   : UnityEngine.EventSystems.OVRInputModule:ProcessMousePress(MouseButtonEventData)
 03-15 22:59:53.085 13339 13355 I Unity   : UnityEngine.EventSystems.OVRInputModule:ProcessMouseEvent(MouseState)
 03-15 22:59:53.085 13339 13355 I Unity   :  
 03-15 22:59:53.085 13339 13355 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
 03-15 22:59:53.085 13339 13355 I Unity   : 
 03-15 22:59:53.085 13339 13355 I Unity   : Enter!
 03-15 22:59:53.085 13339 13355 I Unity   : UnityEngine.Logger:Log(LogType, Object)
 03-15 22:59:53.085 13339 13355 I Unity   : VRButton:OnPointerEnter(PointerEventData)
 03-15 22:59:53.085 13339 13355 I Unity   : UnityEngine.EventSystems.EventFunction`1:Invoke(T1, BaseEventData)
 03-15 22:59:53.085 13339 13355 I Unity   : UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
 03-15 22:59:53.085 13339 13355 I Unity   : UnityEngine.EventSystems.BaseInputModule:HandlePointerExitAndEnter(PointerEventData, GameObject)
 03-15 22:59:53.085 13339 13355 I Unity   : UnityEngine.EventSystems.OVRInputModule:ProcessMousePress(MouseButtonEventData)
 03-15 22:59:53.085 13339 13355 I Unity   : UnityEngine.EventSystems.OVRInputModule:ProcessMouseEvent(MouseState)

How can I fix it?

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image pokkii · May 05, 2021 at 06:57 AM 0
Share

any update?

avatar image chrisfongg · Aug 26, 2021 at 01:39 AM 0
Share

@vrzone-io

Hello, I also got this problem and being stuck for few days, do you have any update on the problem. Thanks a lot.

avatar image chrisfongg · Aug 29, 2021 at 11:33 PM 0
Share

@vrzone-io

Hello, I also got this problem and being stuck for few days, do you have any update on the problem. Thanks a lot.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by DirtyFred · May 12 at 01:44 PM

Hi,

I have the same issue. Did you find an answer?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

204 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Revit, Point Clouds and VR experience. Need help. 0 Answers

How do I get text to render on a canvas in front of the OVRPlayerController in world space and always on top? 0 Answers

Oculus Update 1.27 blocks Unity Game Play 0 Answers

Unity Oculus Go (Android platform) - gradle build fail 0 Answers

Oculus Go & Unity: Microphone Real-time Playback 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges