How to block one pawn but ignore another?

I have a force field-like object in my project that I want to block enemies but let the player walk through it. Both the player and the enemies are pawns, so I can’t set different collision responses to them. I’ve tried adding new channels in project settings (one for player and one for enemies) but I don’t know how to apply the channel to the object.

This question seemed to be asking something similar:

…but mindfane’s answer isn’t helping because “Ignore Actor” does not show up not matter what I do. I see “Ignore Actor When Moving” but that doesn’t work.

Basically I have a wall that should not collide with “Player” pawn and should block “Enemy” pawn. This seems like it should be really simple, but it’s really frustrating me. How do I accomplish this?

1 Like

You should set up collision channels. You can set the channels per object and update each instance dynamically in blueprints. The number of channels is limited to I think 18 for performance reasons, but if you need that many channels then there may be room for simplification.

Even if the good guys and the bad guys are pawns they can have separate channels for their collisions.

I hope this makes sense. My example below uses a blocking volume, and I have created an “Enemy” and “Player” channel for collisions. I set the blocking volume to block “Enemy” and ignore “Player”. I set the object type on the player mesh component to “Player” … That’s it!

The same idea applies to everything, you could just as easily set the wall to “Enemy” or “Player” and then set the custom collisions on each player or enemy to block or ignore one of those custom types. Say you have an enemy that can pass through player walls. You can set that enemy then you might have a second enemy channel like “EnemySpy”
that is ignored by some class of wall or other sensing object.

You could also use this to have some types “seen” by a volume that represents a sensor and another type that is not seen, though once you get into overlaps there is a lot more that can be done in blueprints for the logic portion.

I have a picture…

2 Likes

Thank you! I had set new channels as trace channels instead of object channels.
Changing my player away from pawn caused other problems, so I ended up keeping both player and enemy as pawn, and added a “wall channel” that player ignored but enemy blocked.
Thanks!

Thank you james0x, great response.

Just wondering… that wall channel has to be blocking or something by default?

I don’t know why, but I can’t get this to work!