In this video we see how to make a Raycast ignore certain colliders in Unity, this can be achieved assigning Layers to GameObjects and then define a Layermask variable to use in one of the overloads of the Raycast function.
How to use Raycast to detect click on GameObjects in Unity:
• How to CLICK ON 3D OBJECTS in Unity
How to DRAW Raycast in Unity:
• How to DRAW RAYCAST line in Unity
____________________________________________________________
Watch the following repository where I'll be sharing solutions and examples for Unity
👇
https://github.com/GameDevTraum/GDT-S...
https://gamedevtraum.itch.io/
/ gamedevtraum
____________________________________________________________