# What Is The Most Sure Damage System?

**URL:** <https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994>\
**Category:** Character & Animation\
**Tags:** damage-sense, unreal-engine, UE4, question\
**Created:** [December 29, 2019, 8:11am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994 "2019-12-29T08:11:44Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_be1b3aa61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be1b3aa61](https://forums.unrealengine.com/u/anonymous_user_be1b3aa61)\
**Post date:** [December 29, 2019, 8:11am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/1 "2019-12-29T08:11:44Z")

</div>

Hi friends,  
I’m making FPS game, and I’m using projectile based damage system, where the enemy gets damage when being overlapped (he has collision boxes for the limbs and body and sphere for the head) by the projectile. But I see that not every time I hit the enemy he gets damage. I’m using line trace by channel, and I can see the trajectory of my projectiles, they go straight trough him without doing any damage and in the next moment they do damage like they should. Can anybody suggest me a 100% sure damage system, so every time I hit the enemy he gets damage? Thank you!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 29, 2019, 8:41am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/2 "2019-12-29T08:41:52Z")

</div>

I think everyone has their own damage system, there isn’t a fixed answer.

Having said that, if you’re doing a trace to the enemy to fire the projectile, why not damage the enemy then? ( with the line trace ).

---

<div class="post-metadata">

**Author:** ![ppchavan001](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ppchavan001](https://forums.unrealengine.com/u/ppchavan001)\
**Post date:** [December 29, 2019, 12:16pm UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/3 "2019-12-29T12:16:52Z")

</div>

> **[Action RPG in Epic Content - UE Marketplace](https://www.unrealengine.com/marketplace/en-US/product/action-rpg)**
>
> Do you want to know more about how to make a high-end mobile game for Unreal Engine 4 (UE4) that can be deployed to both Android and iOS? Learn this and more in the Action RPG sample.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_be1b3aa61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be1b3aa61](https://forums.unrealengine.com/u/anonymous_user_be1b3aa61)\
**Post date:** [December 30, 2019, 11:00am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/4 "2019-12-30T11:00:55Z")

</div>

Actually the line trace damage works very well. I have to make many changes, but I think I’m doing it. Thank you!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_be1b3aa61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be1b3aa61](https://forums.unrealengine.com/u/anonymous_user_be1b3aa61)\
**Post date:** [January 3, 2020, 7:49am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/5 "2020-01-03T07:49:55Z")

</div>

Now I found to main issues with the line trace damage system. First, one of my enemy character meshes don’t block the line trace even it’s set to Block All. And second. when I set the enemy’s mesh to Block All, I’m flying away when the enemy hit me with melee attack. I’m flying 10-20 meters away and this isn’t realistic and isn’t cool. Does anyone know how can I fix this?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_be1b3aa61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be1b3aa61](https://forums.unrealengine.com/u/anonymous_user_be1b3aa61)\
**Post date:** [January 3, 2020, 7:52am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/6 "2020-01-03T07:52:42Z")

</div>

Now I found to main issues with the line trace damage system. First, one of my enemy character meshes don’t block the line trace even it’s set to Block All. And second. when I set the enemy’s mesh to Block All, I’m flying away when the enemy hit me with melee attack. I’m flying 10-20 meters away and this isn’t realistic and isn’t cool. Any ideas how can I fix this?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [January 3, 2020, 8:26am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/7 "2020-01-03T08:26:22Z")

</div>

You need to use custom collision channels. You can make as many as you like. So you can have no collision in the normal sense during the game, but have a special channel just for line tracing enemies.

Find out more at:

> **[Collision Filtering in Unreal Engine 4](https://www.unrealengine.com/en-US/blog/collision-filtering)**
>
> Choosing what collides is obviously very important, but it can be tricky, and it’s a problem that we have spent quite a while discussing while developing UE4. The system we have can seem a little complex at first, but it is very powerful and...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_be1b3aa61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be1b3aa61](https://forums.unrealengine.com/u/anonymous_user_be1b3aa61)\
**Post date:** [January 3, 2020, 9:22am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/8 "2020-01-03T09:22:29Z")

</div>

Ah yes, I forgot for these options. Thanks, that could solve the second issue, and for the first, can you suggest why a mesh can’t block line trace when it’s set to Block All?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [January 3, 2020, 9:37am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/9 "2020-01-03T09:37:34Z")

</div>

You have to set the mesh collision in the BP and in the mesh editor.

Does it have a ‘green box’ collision in the mesh editor?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_be1b3aa61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be1b3aa61](https://forums.unrealengine.com/u/anonymous_user_be1b3aa61)\
**Post date:** [January 3, 2020, 10:21am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/10 "2020-01-03T10:21:30Z")

</div>

No, when I check show collision it highlights the terrain with green line. Also it looks like there is no physics asset on this mesh, could this be the reason it doesn’t respond to the line trace?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [January 3, 2020, 10:30am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/11 "2020-01-03T10:30:28Z")

</div>

I mean the far right icon in the mesh editor:

![294747-mesh-editing-toolbar-open.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/3/0/9303eed13a178b6403fb22e086d628d2301ebaf4.jpeg)

When you click that ‘collision’ icon you should see the collision box drawn around the object in green. If you don’t, then you need to use one of the generate options in the collision menu.

Physics wont have anything to do with it.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_be1b3aa61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be1b3aa61](https://forums.unrealengine.com/u/anonymous_user_be1b3aa61)\
**Post date:** [January 3, 2020, 10:55am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/12 "2020-01-03T10:55:16Z")

</div>

This editor you showed is for static mesh, how can I use it for skeletal?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [January 3, 2020, 11:02am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/13 "2020-01-03T11:02:57Z")

</div>

Ok, sorry, not sure about that…

---

<div class="post-metadata">

**Author:** ![blindminds](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/blindminds/32/1213160_2.png) [@blindminds](https://forums.unrealengine.com/u/blindminds)\
**Post date:** [January 3, 2020, 1:05pm UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/14 "2020-01-03T13:05:44Z")

</div>

Sounds to me like you need to do a lot of homework on collision detection in Unreal. There are a ton of tutorials and videos out there and I do believe Unreal has a Live Training video on it. Another factor may be that you need to select the option to “sweep” when detecting your collison, what happens is if your projectile is moving fast enough, one tick it is not colliding, and the next tick it has gone past the hit zone so does not collide. Using sweep should take care of this I believe.  
Also, check if you are using simple, complex, or complex as simple for your collision settings. Both objects need to be using same channel with same settings. Collision detection can get complicated, and as there are many things that can be going on, without seeing your actual project its hard to give you an answer. You just simply have to learn everything you can about collision. It is what I had to do to get my collisions working as I found it very difficult getting help because there are so many tings involved. Also look into custom channels. And check your collision settings both on Blueprint and the Static Mesh. If static mesh does not have a simple collision, you can add a collision component to the BP, or use complex as simple, which uses the wireframe of the mesh for collision and is not recommended for performanc reasons.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_be1b3aa61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be1b3aa61](https://forums.unrealengine.com/u/anonymous_user_be1b3aa61)\
**Post date:** [January 5, 2020, 1:25pm UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/15 "2020-01-05T13:25:13Z")

</div>

Actually, creating a physics asset did the job done. But now I saw other problem. Sometimes when I shoot, the line trace is getting blocked right in front of me. It looks like it is only with the shorter weapons. I taught the capsule component of the player character may block the line trace, but I made custom collision preset and that didn’t solve the problem.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [January 5, 2020, 2:10pm UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/16 "2020-01-05T14:10:15Z")

</div>

When you do the trace you can set ‘actors to ignore’, how about that? ( also ‘ignore self’ ).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_be1b3aa61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be1b3aa61](https://forums.unrealengine.com/u/anonymous_user_be1b3aa61)\
**Post date:** [January 7, 2020, 6:02am UTC](https://forums.unrealengine.com/t/what-is-the-most-sure-damage-system/459994/17 "2020-01-07T06:02:05Z")

</div>

Yes, that worked, thank you very much!
