# Stopping projectiles from going through walls

**URL:** <https://forums.unrealengine.com/t/stopping-projectiles-from-going-through-walls/380451>\
**Category:** FX\
**Tags:** unreal-engine, projectile, question, Blueprint\
**Created:** [December 29, 2016, 6:30pm UTC](https://forums.unrealengine.com/t/stopping-projectiles-from-going-through-walls/380451 "2016-12-29T18:30:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![J0K3R\_12QQ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@J0K3R\_12QQ](https://forums.unrealengine.com/u/J0K3R_12QQ)\
**Post date:** [December 29, 2016, 6:30pm UTC](https://forums.unrealengine.com/t/stopping-projectiles-from-going-through-walls/380451/1 "2016-12-29T18:30:49Z")

</div>

Hello.  
I’m trying to create a blaster (actually a plasma gun). I want it to be stopped, but only by walls because I want it to penetrate enemies. I could just use Event Hit and Destroy Actor, but 1. For some reason it doesn’t work and 2. The visual element of the projectile is Particle System (modified P\_Sparks from Starter Content) that leaves trail and when I destroy it, the trail just disappears.  
How do I do that?  
BTW. If you need any screenshots or additional information, tell me.  
Thanks!

---

<div class="post-metadata">

**Author:** ![vanlacke](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vanlacke](https://forums.unrealengine.com/u/vanlacke)\
**Post date:** [December 29, 2016, 6:36pm UTC](https://forums.unrealengine.com/t/stopping-projectiles-from-going-through-walls/380451/2 "2016-12-29T18:36:23Z")

</div>

You can create custom object/trace channels in the project settings. Make a custom object channel and set the projectile to that, then have your walls block it, but not your pawns.

---

<div class="post-metadata">

**Author:** ![J0K3R\_12QQ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@J0K3R\_12QQ](https://forums.unrealengine.com/u/J0K3R_12QQ)\
**Post date:** [December 29, 2016, 6:44pm UTC](https://forums.unrealengine.com/t/stopping-projectiles-from-going-through-walls/380451/3 "2016-12-29T18:44:26Z")

</div>

Ok, I created the Object Channel, but now how do I edit wall’s collision?

---

<div class="post-metadata">

**Author:** ![vanlacke](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vanlacke](https://forums.unrealengine.com/u/vanlacke)\
**Post date:** [December 29, 2016, 6:52pm UTC](https://forums.unrealengine.com/t/stopping-projectiles-from-going-through-walls/380451/4 "2016-12-29T18:52:19Z")

</div>

Collision settings. Change collision preset to custom and set it to block your new object channel

---

<div class="post-metadata">

**Author:** ![J0K3R\_12QQ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@J0K3R\_12QQ](https://forums.unrealengine.com/u/J0K3R_12QQ)\
**Post date:** [December 29, 2016, 7:01pm UTC](https://forums.unrealengine.com/t/stopping-projectiles-from-going-through-walls/380451/5 "2016-12-29T19:01:07Z")

</div>

Ok, nevermind it worked, but now there is this problem with particles. When I destroy the projectile, particles just awkwardly disappear. Is there a way to fix this?

---

<div class="post-metadata">

**Author:** ![vanlacke](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vanlacke](https://forums.unrealengine.com/u/vanlacke)\
**Post date:** [December 29, 2016, 7:06pm UTC](https://forums.unrealengine.com/t/stopping-projectiles-from-going-through-walls/380451/6 "2016-12-29T19:06:52Z")

</div>

Don’t know much about particles, but I’m sure you will have to change the particle to disappear over time instead of destroying it. I wouldn’t know how to do that, but I’m sure there’s some particles put out my Epic that do just that and you can check those out and copy them

---

<div class="post-metadata">

**Author:** ![Looniper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Looniper](https://forums.unrealengine.com/u/Looniper)\
**Post date:** [December 29, 2016, 7:12pm UTC](https://forums.unrealengine.com/t/stopping-projectiles-from-going-through-walls/380451/7 "2016-12-29T19:12:34Z")

</div>

If you have the rest I will leave you to it.

For the particle trails - have you tried checking Kill on Deactivate on the [Required] section?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8ef379cd1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8ef379cd1](https://forums.unrealengine.com/u/anonymous_user_8ef379cd1)\
**Post date:** [December 29, 2016, 8:05pm UTC](https://forums.unrealengine.com/t/stopping-projectiles-from-going-through-walls/380451/8 "2016-12-29T20:05:37Z")

</div>

There are a couple of ways to do this.

Instead of destroying the projectile, you can destroy the static mesh, and **destroy other components individually** , and then destroy your particle after a delay. Try destroying just the static mesh on impact.

Another way is to create a separate blueprint that only contains your particle effect, and give it its own duration before being destroyed (don’t try just spawning particle systems outside of blueprints–they can persist and eat CPU, even after they are done making particles). Then you can spawn the blueprint at the location where the projectile impacts, or spawn it alongside the projectile with the same velocity.

Hope this helped, good luck!

---

<div class="post-metadata">

**Author:** ![J0K3R\_12QQ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@J0K3R\_12QQ](https://forums.unrealengine.com/u/J0K3R_12QQ)\
**Post date:** [December 30, 2016, 8:10am UTC](https://forums.unrealengine.com/t/stopping-projectiles-from-going-through-walls/380451/9 "2016-12-30T08:10:54Z")

</div>

What if I just used **Deactivate (Particle System)** and **Set Collision Enabled** of my sphere collision to **NoCollision** instead of **DestroyActor**? Is that a good solution? I tested it and particles don’t disappear, and the projectile cannot kill an enemy behind a wall.
