Hi, someone knows how to take the colliding node with a raycast, in GDscript it works like this. var n =$RayCast2D.get_collider() if n.is_in_group("group_name"): print("it's in the group!")#

But in c # it doesn't work or I can't find the way to do it

I reply, I found the solution. I leave the 4 ways that works For it to work you have to do the casting to Node It is also important that in the conditions we detect that it is not null since otherwise we will have an error Youtube Video https://youtube.com/watch?v=2KLXaBvOHtQ&t=28s

solution 1

solution 2

solution 3

solution 4

3 years later