Quantcast
Channel: AR/VR (XR) Discussion
Viewing all articles
Browse latest Browse all 12131

ScreenPointToRay and ViewportPointToRay not working with VR

$
0
0
Environment:
- Unity 5.6
- VR is active and rendering to the HMD

My goal is to raycast from the mouse into the scene, with a VR camera.

When using ScreenPointToRay on a VR camera the ray's direction is way off. Here's an image when my cursor was in the center:

[​IMG]

When using ViewportPointToRay the ray's direction is much better but still not perfect. Here's an image showing the difference (sorry for mouse pic, my screen capturer wasn't picking up...

ScreenPointToRay and ViewportPointToRay not working with VR

Viewing all articles
Browse latest Browse all 12131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>