How to Make a Mesh invisible when characters walks near/behind it

So I don’t fully understand your question but here are two answers:
-you want to make the trees disappear when you “don’t see” them, well the engine handles that alone
-you want to make the tree disappear when thy are in front of you/near, well it is rather simple,
set up a trigger volume,
open your level blueprint,
Call the event “OnBeginOverlap” of the volume,
create a reference of your meshes in your level blueprint,
create a node “set visibility” for the meshes,
connect it to the Event,
set the visibility you want -> when your character will walk in the volume they will disappear.
Make the same for “OnEndOverlap” but set the visibility to visible and here you are!