I’ve been watching this in other games, let’s say a wall gets between the character and the camera, then the camera automatically moves towards the character, then when the character moves away from the wall the camera gets back to the original position, this way the player can always see the character.
Any tips on how can this be solved?
I could raycast from the camera to the character, check if there is something in between, but how to determine if the blocking object is large enough to make it worth moving the camera? Also probably not the best performance wise.
Any other alternative?