Exclude tag from raycast


is it possible to exclude a tag from the “search” of a raycast?

You need to use layers rather than tags. Physics.Raycast() has a LayerMask argument which allows you to check against or exclude any layers. To use it, declare public LayerMask mask; in your gameobject, set the layers you want to check against in the editor, then do for example Physics.Raycast(origin, direction, distance, mask.value);.