How do I fade out an object when the player is behind it?

I’m working with a 3/4 top-down view for my game and one of the biggest issues I have is when the character gets behind something. I’ve tried to keep everything to some kind of scale so this is to be expected. The problem I have is how to combat it? I was playing The Wonderful 101 on the Wii U the other day and when the player gets behind an object it puts a little circle around the character you’re controlling so you can see yourself and the things around you. How is this done?

If that’s too complicated, what’s the best way to deal with the player getting behind things? How would I fade the object between the player and the camera out so that the player can see themselves? I’ve looked around for some tutorials, but since I really don’t know the name of the technique, it’s been difficult to find.

Thanks in advance guys.

To tell if the player is obscured, you could Raycast from the camera to the player. If the raycast hits any collider other than the player, then there’s something in the way. Then, you could use a second camera to render just the area around the player without any obstacles (by setting the second camera to not render whatever layer the obstacles are on), and overlay this on top of the first camera image for just the area around the player.

Alternatively, you could assign a custom shader to the player material that writes to the depth buffer to ensure it is always drawn on top of all other materials.

I’m more of a plugin guy myself, and this is one I was looking in to. It’s for Unity Pro though, and it is only five bucks and you could see how it works.
[Unity Asset Store - The Best Assets for Game Making][1]

as tanoshimi mentioned you can render with shader, or you can try using this shader on your foreground objects