Raycasting and invisible barriers

Want to create an invisible barrier in front of a door that opens by raycasting. Tried box colliders but they seem to block the raycasting. The idea is that you can see the door open from a distance but you can't get too close to the opening. Not a scripter so something simple if you can. Thanks a million.

Set the invisible barrier's layer to IgnoreRaycast, and it should just let the raycasts go through to the door

Thank you! I'll try that. Cheers.