Top down view: character behind objects

Hi guys,

I am experimenting with top-down view template, and one thing that I would like to implement is the solution to classical problem, when the character gets behind and object and the camera can not see through object, so we don’t see him. In the games this is solved by making the part of object transparent. Here is the illustration of the problem:

I know this is very common issue, buy I do not know where to start trying to solve it: can I make it in blueprint? If yes, how can I do something like raycasting there between the camera and the char, and then get all the overlapping objects, so I can make them transparent? Or maybe I should try and play with depth buffer? Or is it only possible to be fixed via engine code?

Any advice would be really appreciated.

Ok, I kind of found the rough workaround, but that is very primitive way of doing things. I use a bounding box which is put between the camera and actor (as I could not figure out how to properly use tracing in this situation) and hide all the objects which are overlapping with that box. The problem is that

  1. BSP does not throw any overlapping events whatsoever, so this would work only with static meshes etc. Basically, that is not so bad, but more deep solution, involving depth buffer, would be much better.
  2. The actor just roughly disappears from screen and then appears back, when you move from it. There is no way in BP, as far as I know, to make it partially transparent or at least fade smoothly.
    So, still looking for better way.

Here you go one more rough solution:
Just make the player mesh’s model material Translucent and with no depth check. It works on any geometry including bsp. The downside is that you loose some orientation, and it looks quite odd generally.