I am trying to make the camera that follows behind my player character not go behind walls. For example, lets say I rotate my character next to a wall (with the camera behind the character, facing where the character is facing). Instead of moving along the wall and constantly viewing the character's back (even closing up to the character's back if need be), the camera goes behind the wall instead, so that I cannot see my character's back, or where the character is facing; only the other side of the wall that my character is next to.
Does anyone know of a function or technique to have the camera behind the character move along walls as the character turns, instead of go through them, so that I can always see character's back and facing direction at all times?