Making Playercharacter go transparent when camera is closer

Hey guys, I want to make my character slowly go transparent when the camera is closer to him. For example when there is a wall and the camera closes in on the character.
Is there any way to do that?
I saw that in some games like the new Zelda BOTW and think it’s a nice and simple solution for those cases.

Any ideas?