Click-to-move behind static mesh

Hi,

Building on the example project Blueprint Third Person, I am attempting to allow the character to move behind objects when clicking on “where the ground would be”.

I have also implemented a rudimentary blueprint to hide actors between the character and the camera, like so:

So, for my actor-hiding Event Graph I have to use Visibility for Trace Channel, such as it is, however I was wondering if there was a way to change the collision for the meshes, adjust the blueprint for a different method of hiding them, or a way to adjust the bundled MyController blueprint for click-to-move?

…I should note that I’ve been using UE for just a few days, but have had a hard time finding a solution online.

Thanks in advance.

Hey 72o,

Likely your best solution will be to add a new Trace Channel to use for either your Mouse Clicks. You can add a new Trace Channel by going to Edit > Project Settings > Collision. Once you add the new trace channel, you can select all of your objects in the level that you would want to be able to click through and tell them to ignore that new channel under their collision settings. You can then modify your click-to-move code/blueprint setup (guessing you’re using a line trace to figure out where to move) and have it use the new Trace Channel instead of Visibility.

Hope this helps out!

-Steve

Hi Steve,

I experimented with a custom Trace Channel earlier but couldn’t quite figure it out, but now I understand it. Thanks for the explanation, seems it’s the way to go.

Unfortunately the method broke my actor-hiding method/blueprint, as the hidden actors sometimes don’t reappear after moving away from under them. I guess I have a new problem to learn from now! :slight_smile:

Thanks again.

Great solution! Thank you so much! =D