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.
radicalappdev
6 years agoProtege
This is what I used. They provided some good examples of how to use the laser pointer for different things. You may need to make a new line renderer that to use in place of the one provided if you want to do the "short version" of the laser.
https://developer.oculus.com/blog/easy-controller-selection/
Keep in mind that the Raycast hit point and the line renderer are separate things. You are not actually Raycasting the line renderer.
Use Raycast hit to get a transform in world space.
Then use that transform to place a UI dot or indicator.
Basically, Raycasting is just a neat way of getting a transform in space that you can then use in code, setting the transform.position of another object.
https://developer.oculus.com/blog/easy-controller-selection/
Keep in mind that the Raycast hit point and the line renderer are separate things. You are not actually Raycasting the line renderer.
Use Raycast hit to get a transform in world space.
Then use that transform to place a UI dot or indicator.
Basically, Raycasting is just a neat way of getting a transform in space that you can then use in code, setting the transform.position of another object.
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