How do I detect if I am clicking on a meshinstance3d?

You can also make the static body and the collision when you make the mesh. Rays also require the collision shape to detect any hits.

Another approach is more low-level. Start here:

You’d make an AABB “around” your cursor and then use RenderingServer class to find intersection. The problem is that your cursor is not actually in the screen, so I’m not sure how you’ll handle z depth.

1 Like