Forum Discussion
nigrin
13 years agoExplorer
[TIP] Detecting where the player looks at
Hi guys, we came across this for our vrjam game "Sorcerer's Wrath", where the player fights things by just looking at them. Here is a quick blog post how we did this, I have not seen this specif...
sh0v0r
12 years agoProtege
Lunar Flight uses ray casts for the cockpit interaction. I placed and object between the eyes which is a child of the Right Camera as this is the camera that all other cameras reference for orientation information. I use it's forward vector for the raycast direction and cast just a bit further than the depth of the cockpit.
Everything the player can interact with has a collider and an object that contains all it's information. When the ray cast hits one of them it then gets the info object to know what icon or string to display and it's interaction method. The raycast is also only done every 100ms.
Everything the player can interact with has a collider and an object that contains all it's information. When the ray cast hits one of them it then gets the info object to know what icon or string to display and it's interaction method. The raycast is also only done every 100ms.
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
- 3 years ago
- 9 months ago