Forum Discussion
pixelcase
7 years agoHonored Guest
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 OVRP...
- 6 years agoAny 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.
pixelcase
6 years agoHonored Guest
I've had issues with that blog post because the OVR Utilities and contained scripts keep changing. So I'm at the point where I just want to script the Raycast hit myself manually.
So, I've got my OVRPointerVisualiser and it's spitting out a laserbeam LineRenderer. I've got my canvases with OVRRaycaster scripts attached to them. The raycaster is obviously working because it's registering my 'clicks' when I pull the controller trigger on my buttons.
So, how do I script a Raycast hit to run on the Update function or similar so when I move laser onto the canvas (OnPointerEnter?) it is constantly sending the correct position to a laser dot sprite?
So, I've got my OVRPointerVisualiser and it's spitting out a laserbeam LineRenderer. I've got my canvases with OVRRaycaster scripts attached to them. The raycaster is obviously working because it's registering my 'clicks' when I pull the controller trigger on my buttons.
So, how do I script a Raycast hit to run on the Update function or similar so when I move laser onto the canvas (OnPointerEnter?) it is constantly sending the correct position to a laser dot sprite?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 9 months ago
- 10 months ago
- 4 years ago