Forum Discussion
nigrin
12 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...
vajra3d
11 years agoHonored Guest
If your code is referencing the camera itself (as it is w/ the example code) then you can just attach it to virtually any gameObject you want and it should work for you.
If you are going to be casting to only one object then you might want to attach it to the target object itself otherwise if you are going to cast to multiple objects then you might consider attaching it to the playerController for convenience sake.
You can also just create an empty gameObject, give it a relevant name, and attach it to that. Good luck!
If you are going to be casting to only one object then you might want to attach it to the target object itself otherwise if you are going to cast to multiple objects then you might consider attaching it to the playerController for convenience sake.
You can also just create an empty gameObject, give it a relevant name, and attach it to that. Good luck!
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
- 2 years ago
- 9 months ago