Is there a way to have visual debug for raycasting with space_state.intersect_ray?

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

I know there’s an option to turn on visual debug to view collision and raycast nodes and I have turned this on, but I don’t see any raycasts that are created in the script through space_state.intersect_ray. Is there a way to show these?

As a side note, is it possible to change colors of individual collision nodes so there’s an easy way to visually differentiate one from another when they overlap?

:bust_in_silhouette: Reply From: avencherus

I don’t think such queries linger about to even be visualized. As far I can I tell debugging visuals are not drawn for these. I’ve gone the manual route for these cases. In 2D using the points to draw a line on a canvas _draw(), or in 3D use a unit sized primitive for a mesh, scale it up, position it, and apply a basic FixedMaterial with the color and transparency I prefer.