Is there a way for Raycasting to account for all intercepted objects?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want the ray to tell me about all the objects it came into contact within its set magnitude.

  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Looked through the wiki and I can’t find anything on it. Basically just when something comes into contact of the ray, but it’s only the first object.

Any time a ray hits an object, add that object to an ignore list, then create a new ray where that ray hit the object with the same direction.

Loop this until there are no more objects hit.

1 Like