Forum Discussion
Xzapo
11 years agoHonored Guest
RayCasting From VR Camera In Unity
I am currently trying to figure out how to raycast from the VR Camera (meaning that it cast from where the player is looking with the headset). Has anyone done this in Unity yet? Or can some help tell me how to access the head tracking information to raycast from. Any help or tips is much appreciated!
3 Replies
Replies have been turned off for this discussion
- cyberealityGrand ChampionYou can try casting the ray from CenterEyeAnchor.
- wheatgrinderExplorerEDIT: Center Eye Anchor is not a camera in the OVR Camera rig, chose LeftEyeAnchor or RIghtEyeAnchor instead.
Its not that hard. There is nothing special about ray casting from the oculus, you dont need any head tracking info, in fact you can test by ray cast from the Unity standard FPS Controler/FirstPersonCharacter and when your ready for VR, just switch to the Center Eye Anchor from in the OVR Camera rig..
Run this tutorial for a DK2 reticle. When your done you will have a useful script and learn enough to raycast from the oculus..
https://www.youtube.com/watch?v=LLKYbwN ... 1zCJqFJwqw - RiverExplorerStart Partner
That youtube video is NOT available.
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
- 8 months ago
- 7 months ago
- 3 years ago