Equivalent of layer masks in UE4

Hello!

I was wondering since my only experience with engine tools is Unity3D, what is the equivalent of the layer mask in UE4?

I’m using “Get Hit Under Result By Channel” right now to move my camera based on that but the problem is that the impact just happens on everything I’m pointing at when I only want the terrain to be used as an impact.

Is there a way to specify that somewhere?

Thanks,

Hi Jonathan,

I have a top down view a bit like the default top down project. I use the “Get Hit Under Result By Channel” to know where my cursor is in the world and also to rotate my character towards the cursor.

The problem is, this function also get in contact with the assets in the world, so if I make a wall or any assets that have a specific height and any collision, the hit result will end up on the assets instead of my terrain.

Hey, Fauzruk! Might I ask what you’re trying to do? There might be another way to do it in UE4.

I believe the best way to do what you’re looking for here is to set the channel of the Get Hit Result node. By default, it’s set to ‘Visibility’, so it’ll only work with objects that are set as ‘visible’. What you’ll probably want to do, then, is go into Edit->Project Settings->Collision->Trace Channels and create a custom channel. I made one called ‘Ground’. Then, under the Details panel of the static meshes you’re using for the ground, expand ‘Collision Presets’ and check ‘Block’ for the ‘Ground’ channel. For objects like pillars that you want to be ignored by the trace, set their ‘Ground’ channel to ‘Ignore’.

That should do what you’re looking for!

Regards,

Jonathan