Check if something is in between 2 objects.

Hello
I’m working on a radiation game, and I’m fairly new to scripting so I’m not sure how to make sure that an object only receives radiation when there is no colliders between the player and the radiation source. How can I check that? A raycast of some sort?

Your Radiation source can perform a Raycast and if it hits the Player then player will receive radiation otherwise not.