Top down template: walking past invisible walls

I have created a project using the top down template. I have created a line trace between camera and actor and I hide meshes that are hit by the trace by using Single Line Trace for Objects → Set Actor Hidden in Game.
I am having the following problems:

  1. The mouse hit event hits the invisible wall when it’s hidden. As a result, I cannot move the character behind the wall even if it’s invisible.
  2. The Line Trace hits invisible objects too, as a result, I can only hide one object at a time.
  3. Is it possible to make some objects not trigger the mouse click event? I want the character to move behind a wall even if it’s visible at the moment at some occasions.

I suspect that points 1 and 2 are somehow related to configuration, I think I have he enum array for EObjectTypeQuery set incorrectly, but I can’t figure it out myself. Thanks for any help.

Just to make sure I understood it correctly, you want to achieve a similar effect like in Diablo 3, right?

  1. you probably also need to disable collision of that invisible object. Try the Set Collision Enabled to a new type of No Collision.

  2. You cold give a try to Single Capsule Trace By Channel, instead of casting a line it casts a capsule with a given Half Height and Radius. (Dont forget to play with the Draw Debug Type of that node to have an idea of the size of the trace.)

  3. At Edit->Project Settings->Collision you can create new Trace Channels. Create like Ground and Wall. and set them accordingly to the objects in the map. And instead of tracing for the Channel Visible, trace for Ground.
    Note: BSP are always in the Visible channel, you cant change that.

I’m also working on a similar game and my approach would be have a BP that is a trigger and have an array of static meshes which is filled in the editor by the meshes to disappear/reappear on OnBeginOverlap/OnEndOverlap.

a basic foreach that makes them to be visible or invisible would do the trick and way more performance friendly.

Thanks, your answer was very helpful. How do you suppose I should go about making the walls reappear after they no longer obstruct the view? Should I just save their references in some collection and check it every tick? Or is there some better solution? Something event driven perhaps?