Unity's Raycast functions has a parameter you could use to raycast to a particular GameObject. You can also use that parameter to ignore particular GameObject.
avplayerview
cocoalumberjack
yolo
importrange
tabcontrol
web-console
opensolaris
magnetometer
subscriber
actionmethod
image-scanner
mergeddictionaries
best-buy-api
autotile
django-fsm
s3transfermanager
floating-point-conversion
proficy
renative
diagnostic-tools
shell32
overlayfs
clouddevelopmentkit
angular11
msmq
terraform-provider-gitlab
smtp
radlistview
apigee
setcontentview