Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
pixelcase's avatar
pixelcase
Honored Guest
7 years ago
Solved

How can I get the Laser Pointer from Easy Controller Selection guide to 'collide' with UI Canvas?

I have followed the tutorial at https://developer.oculus.com/blog/easy-controller-selection/ and succesfully got a Laser Pointer to interact with world-space UI canvases, but the laser beam (from OVRPointerVisualiser) attached to my controllers goes through the canvas, despite working for interaction.

Is there a simple way to allow the laser pointer beam to 'collide' with the canvas to display a dot or ring moving along the canvas panel surface, instead of just travelling through the canvas? I know I can adjust the length of the laser beam but I have UI panels at different depths so need the laser beam to display a dot at different depths per each canvas.
  • Any of our sample scenes (in the SampleFramework folder) should do that, with the DebugUI. It updates the endpoint every frame so that the laser doesn't go through the canvas. Not saying you need to use the sample, but that the code itself to do that update is only a few lines.

12 Replies

Replies have been turned off for this discussion