I need to be able to detect more than one collision with rayCast(). as soon as rayCast() detects a single object in its path, it stops and spits out the information about the object it detected. I need to use rayCast() for a pip algorithm.
is there a way to do this?
I set up a “while” loop that kept raycasting using the last raycast’s hit coordinates until it got a “None” result. every time it got a positive result it adds 1 to a variable. I then use that variable in the pip algorithm.
if there is a better way, feel free to let me know. this works pretty well though.