Exclude collision layers on Intersect_ray()

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MarcPhi

Is there a way to set programmatically the collision layer of a ray created with intersect_ray()?
I know that we can exclude shapes but this won’t work with a gridmap.

:bust_in_silhouette: Reply From: Allen Kennedy Jr.

If you check the docs for the intersect_ray function you can see that the forth parameter is the collision layer for the ray.