Question by
sidwasnothere · Mar 22, 2019 at 07:58 PM ·
vrsteampointerlaser
How to "click" an object using SteamVR Laser Pointer
How can you "click" an object using the Laser Pointer? I have a script on a gameobject that I want responding to clicks, like a UI button would (but it isn't a button). I want to point the laser at the object, click my trigger button, and have the object read the clickdata that the LaserPointer creates by implementing the OnPointerClick(PointerEventData e) or OnPointerUp(PointerEventData e). Currently nothing happens despite everything involved having rigidbodies and colliders (for the Physics.Raycast).
I'm switching from HoloToolKit (MRTK) to SteamVR. Doing this was extremely easy using HoloToolKit and I thought I switched out the relevant HoloToolKit code for SteamVR code but it just is not working.
Comment