Quantcast
Channel: Answers for "Camera.main"
Viewing all articles
Browse latest Browse all 4

Answer by fafase

$
0
0
Because your mouse is the screen position while your ray origin is the world position. The fact that y is the same is just a coincidence that your camera happen to be positioned properly for this. Your ray position is depending on the position of the camera in the world, the Input.mousePosition is always a value between 0 and width/height of the screen.

Viewing all articles
Browse latest Browse all 4

Trending Articles



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