I'm new to Godot, but not to OOP. I'm puzzled by something, which I guess goes to my lack of understanding of node hierarchies in general:
If raytracing intersection looks for collision objects; how come, then, it yields a parent node of the collision object? Does it somehow have to do with signals?
I looked at this example: https://kidscancode.org/godot_recipes/4.x/3d/shooting_raycasts/index.html (code at https://github.com/godotrecipes/3d_shoot_raycasts.) For example, in the node hierarchy, there is a node named "Ground" with a child named "Ground," which in turn has a child of type CollisionShape3D.
Although the mid level Ground node is of type StaticBody3D which means it is also a CollisionShape3D, it has the disable_mode removed, which from what I understand it does not participates in the collisions and raycastings.
The code for shooting uses raycasting
var collision = space.intersect_ray(query)
if collision:
$CanvasLayer/Label.text = collision.collider.name
I would have expected the raycasting collision to be with the CollisionShape3D, but "Ground" is displayed instead.
What's going on?