- Home /
Show buittons when cancas being looked at
I am creating an app using OculusVR.
I have a canvas which has a number of buttons. I wish these buttons to appear only when the user looks down at that area.
How can I detect the event of the used looking there so that I can activate the buttons?
Answer by laurentlavigne · Apr 28, 2017 at 05:55 PM
If it's for performance reason, view frustrum culling handles the render portion of that and I think that mouse ray cast events of the uGUI also get culled. If you're really scratching for extra ms, you can use CullingGroups: https://docs.unity3d.com/Manual/CullingGroupAPI.html. The example also applies to 3d uGUI buttons.
The reason I need it is because I only want the buttons to appear when the user is looking down to the bottom of the "screen". They are action buttons which shouldn't appear at all times.
Your answer
Follow this Question
Related Questions
Can't get Oculus Go controller to interact with Canvas 1 Answer
Avoid reset of position when Oculus HMD is removed. 0 Answers
How can I fix flickering in a distant terrain object with a VR flight sim for the Oculus Quest? 0 Answers
Oculus Quest - Screen freezes/image follows face upon returning to main menu 1 Answer