I wanted to post this on stack overflow, but I feel that this SE is more appropriate.
I am extremely naive in the world of ray casting technology so I’m trying to create one out of my own knowledge about how it works. Currently, I have a 2D raycaster that solves a bunch of linear equations to look for collisions of rays and shapes; my shapes are defined by a set of linear equations.
However, the lines that make up a shape are independent of one another and therefore the ray casts “through” the object and detects a collision on its far interior side. I want my program to remove these sorts of detections somehow. Any suggestions?
Again, I’m new raycasting and programming in general, so any level of help is much appreciated!