# How to make linetrace ignore capsule of the enemy AI

**URL:** <https://forums.unrealengine.com/t/how-to-make-linetrace-ignore-capsule-of-the-enemy-ai/1329821>\
**Category:** Blueprint\
**Tags:** line-trace, collision-detection, unreal-engine, enemy, Collision, Blueprint, question\
**Created:** [October 11, 2023, 10:18pm UTC](https://forums.unrealengine.com/t/how-to-make-linetrace-ignore-capsule-of-the-enemy-ai/1329821 "2023-10-11T22:18:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Player\_003](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Player\_003](https://forums.unrealengine.com/u/Player_003)\
**Post date:** [October 11, 2023, 10:18pm UTC](https://forums.unrealengine.com/t/how-to-make-linetrace-ignore-capsule-of-the-enemy-ai/1329821/1 "2023-10-11T22:18:32Z")

</div>

So i want to be able to make headshots deal more damage but when i try to get bone name it just dont want to work because capsule goes into the way i tryed putting capsule to ignore camera and visiblity but than line trace just go trough whole enemy and doesnt hit the player mesh even tho i put collision of the mesh to block camera and visibility.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 11, 2023, 10:37pm UTC](https://forums.unrealengine.com/t/how-to-make-linetrace-ignore-capsule-of-the-enemy-ai/1329821/2 "2023-10-11T22:37:31Z")

</div>

- create a new `Ignored` channel:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/2/2/122cac3c136f6b3822d3ea8b6d747ba41aaed897.png)

- ensure the mesh blocks it:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/3/f/83f85c61ec8c63831128ad00170c0809d1c1ae9c.png)

- when you trace, trace on that channel:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/3/d534e3294fa1731b8360c91f99755bc9fd36ca8f.png)

* * *

More about collision:

[https://www.unrealengine.com/en-US/blog/collision-filtering](https://www.unrealengine.com/en-US/blog/collision-filtering)

> **[Collision in Unreal Engine - Overview | Unreal Engine 5.7 Documentation |...](https://dev.epicgames.com/documentation/en-us/unreal-engine/collision-overview?application_version=4.27)**
>
> An overview of how Collision and Collision Responses operate in Unreal Engine.

* * *

Technically, you do not need to create additional channels, you can play with the existing ones once you wrap your head around how collision filtering works. Example:

> [@Heath Bar for Different limbs](https://forums.unrealengine.com/t/heath-bar-for-different-limbs/238988/3):
>
> So I played with this and got here: Found a neat way to map widgets onto the physics asset. How close is this to what you need?

---

<div class="post-metadata">

**Author:** ![Player\_003](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Player\_003](https://forums.unrealengine.com/u/Player_003)\
**Post date:** [October 11, 2023, 10:57pm UTC](https://forums.unrealengine.com/t/how-to-make-linetrace-ignore-capsule-of-the-enemy-ai/1329821/3 "2023-10-11T22:57:43Z")

</div>

It works only sometimes and never hits the head bone

---

<div class="post-metadata">

**Author:** ![Player\_003](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Player\_003](https://forums.unrealengine.com/u/Player_003)\
**Post date:** [October 11, 2023, 11:12pm UTC](https://forums.unrealengine.com/t/how-to-make-linetrace-ignore-capsule-of-the-enemy-ai/1329821/4 "2023-10-11T23:12:04Z")

</div>

Ok never mind it works now

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [November 10, 2023, 11:12pm UTC](https://forums.unrealengine.com/t/how-to-make-linetrace-ignore-capsule-of-the-enemy-ai/1329821/5 "2023-11-10T23:12:19Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
