Raycast through multiple objects

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sanjib
:warning: Old Version Published before Godot 3 was released.

I’m trying to cast a ray cast in a straight line and get all the nodes hit by the ray however I can only get the hit location of the first node the ray hits. How do I get all the hit points created by the ray?

:bust_in_silhouette: Reply From: eons

A ray hits only the closest object, you may be talking about a segment, look here for a possible answer get a list of objects which raycast crossed - Archive - Godot Forum