Quantcast
Channel: Latest Questions by dhendrix
Viewing all articles
Browse latest Browse all 42

Getting position where raycast goes offscreen

$
0
0

Is it possible to fire a raycast in a direction, then get the position when the raycast hit the edge of the screen in world coordinates? For example -

alt text

Let's say this is a 2d game and the black circle is the player. He fires off raycasts in arbitrary directions (the blue rays). Can we get the position where the ray left the camera viewport? Apologies if I'm missing something simple here(which is likely).


Viewing all articles
Browse latest Browse all 42

Trending Articles



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