Skip to main content
Participant
November 27, 2018
Solved

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

  • November 27, 2018
  • 12 replies
  • 9278 views
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.
    This topic has been closed for replies.
    Best answer by mfmf
    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

    Participant
    March 13, 2019
    I'm trying to get Easy-Controler Selection to work, but I don't see the OVRPointerVisualizer script in the Integrations package.
    pixelcaseAuthor
    Participant
    March 14, 2019
    OVRPointerVisualiser is basically deprecated at this point, though it did provide me with a good laser pointer when I used it initially. Now, the latest Oculus Utilities has a different way to generate a laser pointer.

    In the end, I deleted all of my oculus stuff in my project and reinstalled it via the Asset Store, and then followed mfmf's advice above to check the usage in the DebugUI scenes, and basically copied that integration over to my scenes.