What is the difference between Raycast and RaycastAll?

I am newbie and I have read the scripting reference. I could not make out what is the exact difference between Raycast and RaycastAll. If anyone can explain me with an easy to understand example I would be thankful.

1 Answer

1

Raycast returns the first thing hit by the ray - RaycastAll returns everything that was hit along the length of the ray.