How to stop reach tool from going through walls

I created a simple reach tool by creating a rectangle from my players head height and have it set to isTrigger.
This works fine for the most part however I have recently discovered that my reach tool can pick up objects on the other side of walls and I was wondering if there was a way to resolve this.

I’m not sure how to approach this problem as this is my first time developing with 3D and I haven’t found anything online to try to resolve this issue.

By this I assume you mean you have a trigger zone?

Most games work this by raycasting or any of the similar ‘cast’ methods from the camera/player to determine whether they’re facing something interactable. This accounts for objects such as walls occluding the camera/player’s vision.

Lots of tutorials out there on how to use raycasts.

I have tried using this but attempting to make the switch will require a lot of rewriting and I don’t think that it’s viable for me uunfortunately

I’m not sure how your code is structured as you’ve proved no examples, but I can’t imagine either approach being very many lines of code.

You can of course combine approaches.