简体   繁体   中英

Trying to Raycast From HTC Vive Controller in Unity

I want to be able to point at an object and for it to know what the object is and then destroy it on click (I have research participants that need to point at fish swimming and then when they click it goes away and they get a point. I just don't know where to start in getting raycasting to work and for the controller to know what it's pointing at. I am also using Steam VR. Thank you!

Have you looked at the SteamVR Laserpointer example? It's in Assets/SteamVR/Extras if you've installed the SteamVR package in your project. I haven't tried it myself, but it sounds like what you're looking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM