Invisible wall

Hello. How can such an invisible wall be implemented? To display the wall only when the player approaches.

Thanks!


image

Thanks a lot, it helped! The fact is that I have a game with a top view and there is no need to calculate the distance from the camera. I need to calculate the distance from an object (player) to a wall. How can i do this?

2 Likes