# Block NPC from area, not the player

**URL:** <https://forums.unrealengine.com/t/block-npc-from-area-not-the-player/470956>\
**Category:** World Creation\
**Tags:** blocking-volume, unreal-engine, Physics, Collision, question\
**Created:** [September 7, 2020, 1:31pm UTC](https://forums.unrealengine.com/t/block-npc-from-area-not-the-player/470956 "2020-09-07T13:31:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruno.Martelli](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bruno.martelli/32/594427_2.png) [@Bruno.Martelli](https://forums.unrealengine.com/u/Bruno.Martelli)\
**Post date:** [September 7, 2020, 1:31pm UTC](https://forums.unrealengine.com/t/block-npc-from-area-not-the-player/470956/1 "2020-09-07T13:31:10Z")

</div>

Hi for VR to teleport we use the navmesh. I want to block the NPC from some areas that are still accessible to the player. Regular collision blocks both.

---

<div class="post-metadata">

**Author:** ![shipster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shipster](https://forums.unrealengine.com/u/shipster)\
**Post date:** [September 7, 2020, 1:48pm UTC](https://forums.unrealengine.com/t/block-npc-from-area-not-the-player/470956/2 "2020-09-07T13:48:42Z")

</div>

You can use blocking volumes and update the collision settings in the details.  
Give the NPCs a collision channel that you can then block in those settings.  
Ignore the channel of your player there.

---

<div class="post-metadata">

**Author:** ![Bruno.Martelli](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bruno.martelli/32/594427_2.png) [@Bruno.Martelli](https://forums.unrealengine.com/u/Bruno.Martelli)\
**Post date:** [September 7, 2020, 3:52pm UTC](https://forums.unrealengine.com/t/block-npc-from-area-not-the-player/470956/3 "2020-09-07T15:52:06Z")

</div>

Thanks for quick answer. But how to give NPCs a collision channel? You mean the preset collision?

---

<div class="post-metadata">

**Author:** ![shipster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shipster](https://forums.unrealengine.com/u/shipster)\
**Post date:** [September 7, 2020, 4:05pm UTC](https://forums.unrealengine.com/t/block-npc-from-area-not-the-player/470956/4 "2020-09-07T16:05:31Z")

</div>

You have to configure the collision of their capsule (if they are characters, if not, they should have some other type of collision geometry set).

Set the object type there, and set a proper response in the blocking volume for the given object type collision settings.

---

<div class="post-metadata">

**Author:** ![Bruno.Martelli](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bruno.martelli/32/594427_2.png) [@Bruno.Martelli](https://forums.unrealengine.com/u/Bruno.Martelli)\
**Post date:** [September 7, 2020, 4:14pm UTC](https://forums.unrealengine.com/t/block-npc-from-area-not-the-player/470956/5 "2020-09-07T16:14:29Z")

</div>

They have collision capsules - the preset is character mesh. The proper response in the blocking volume would be also character mesh???

---

<div class="post-metadata">

**Author:** ![shipster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shipster](https://forums.unrealengine.com/u/shipster)\
**Post date:** [September 7, 2020, 4:52pm UTC](https://forums.unrealengine.com/t/block-npc-from-area-not-the-player/470956/6 "2020-09-07T16:52:28Z")

</div>

Create a new Object channel in your project settings. I created as an example “Enemy” here.  
Assign this channel to your NPCs (in the collision settings of the capsule).

 ![312749-projectsettings-channel.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/e/53e851801483a700f8c4707931f3100807a68aba.png)

Next, drag a blocking volume into your leven and configure the collision there. Set it to custom and ignore all channels except the “Enemy” channel.

 ![312750-enemy-blocker.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/b/9bbb625017f292af01fed85e8d942acd5ae29197.jpeg)

---

<div class="post-metadata">

**Author:** ![Bruno.Martelli](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bruno.martelli/32/594427_2.png) [@Bruno.Martelli](https://forums.unrealengine.com/u/Bruno.Martelli)\
**Post date:** [September 7, 2020, 6:11pm UTC](https://forums.unrealengine.com/t/block-npc-from-area-not-the-player/470956/7 "2020-09-07T18:11:56Z")

</div>

interesting - that doesnt work for me at all is it possible to see the settings on the characer?
