# Always Hitting Projectile for a TD-Game

**URL:** <https://forums.unrealengine.com/t/always-hitting-projectile-for-a-td-game/1771863>\
**Category:** Blueprint\
**Tags:** unreal-engine, projectile, question, Blueprint\
**Created:** [March 25, 2024, 6:09pm UTC](https://forums.unrealengine.com/t/always-hitting-projectile-for-a-td-game/1771863 "2024-03-25T18:09:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brotdose](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Brotdose](https://forums.unrealengine.com/u/Brotdose)\
**Post date:** [March 25, 2024, 6:09pm UTC](https://forums.unrealengine.com/t/always-hitting-projectile-for-a-td-game/1771863/1 "2024-03-25T18:09:39Z")

</div>

Hey you,

Thanks for trying to help 🙂

For my TD-Game I need a Projectile that always hits, no matter what. I already tried that with the homing projectile itself, but it tends to fail some times, also i tried a niagara variant, but there is a problem with dealing damage to the exact target and also that the projectile tends to rotate around the target.

Do you now someone who had a similar problem or had a solution for his own TD?

Thanks in advance! 🙂

---

<div class="post-metadata">

**Author:** ![Shunitzo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shunitzo/32/1194547_2.png) [@Shunitzo](https://forums.unrealengine.com/u/Shunitzo)\
**Post date:** [March 25, 2024, 6:24pm UTC](https://forums.unrealengine.com/t/always-hitting-projectile-for-a-td-game/1771863/2 "2024-03-25T18:24:05Z")

</div>

Something like that:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/9/179b69ed25b84c60d44d574b91c24e4fd5afd22d.jpeg)

---

<div class="post-metadata">

**Author:** ![Brotdose](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Brotdose](https://forums.unrealengine.com/u/Brotdose)\
**Post date:** [March 25, 2024, 7:29pm UTC](https://forums.unrealengine.com/t/always-hitting-projectile-for-a-td-game/1771863/3 "2024-03-25T19:29:25Z")

</div>

This would be an always hitting solution, but there will be lots of projectiles, so an Eventtick might be too expensive

---

<div class="post-metadata">

**Author:** ![Shunitzo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shunitzo/32/1194547_2.png) [@Shunitzo](https://forums.unrealengine.com/u/Shunitzo)\
**Post date:** [March 25, 2024, 7:47pm UTC](https://forums.unrealengine.com/t/always-hitting-projectile-for-a-td-game/1771863/4 "2024-03-25T19:47:03Z")

</div>

Physics solving is also on tick. So, not much of a difference.

---

<div class="post-metadata">

**Author:** ![Brotdose](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Brotdose](https://forums.unrealengine.com/u/Brotdose)\
**Post date:** [March 25, 2024, 7:50pm UTC](https://forums.unrealengine.com/t/always-hitting-projectile-for-a-td-game/1771863/5 "2024-03-25T19:50:49Z")

</div>

Oh thats actually good to know!

 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/4/f/44ffbc1f7e987307e18b703769bda99ef0b3dc13.png)

I was wondering if my Idea, that the distance to the enemy divided with the Velocity of the Projectile give the exact Time the projectile would need to reach its target? So i can take that time and use it as a “Make sure Delay” to call the Hit event nevertheless when the Projectile is still valid and in that case has missed the Enemy?

---

<div class="post-metadata">

**Author:** ![Shunitzo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shunitzo/32/1194547_2.png) [@Shunitzo](https://forums.unrealengine.com/u/Shunitzo)\
**Post date:** [March 25, 2024, 7:59pm UTC](https://forums.unrealengine.com/t/always-hitting-projectile-for-a-td-game/1771863/6 "2024-03-25T19:59:22Z")

</div>

As I understand.

When engine calculates physics object movement on each frame, if the speed is too high, it can pass objects.  
Example:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/0/2/202ac8b4ca5197fc7af53c76b3ad01afaad26799.png)

---

<div class="post-metadata">

**Author:** ![Brotdose](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Brotdose](https://forums.unrealengine.com/u/Brotdose)\
**Post date:** [March 25, 2024, 8:03pm UTC](https://forums.unrealengine.com/t/always-hitting-projectile-for-a-td-game/1771863/7 "2024-03-25T20:03:32Z")

</div>

Yeah, the Idea of using the time the projectile would need to reach its target is just a “Make Sure” function of the projectile, in case the homing system misses or orbits around the target. So It should call the hitevent when overlapping the Target in the first place, even tho it could surpass the target like in your example

---

<div class="post-metadata">

**Author:** ![Shunitzo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shunitzo/32/1194547_2.png) [@Shunitzo](https://forums.unrealengine.com/u/Shunitzo)\
**Post date:** [March 25, 2024, 8:10pm UTC](https://forums.unrealengine.com/t/always-hitting-projectile-for-a-td-game/1771863/8 "2024-03-25T20:10:02Z")

</div>

Hm, I think it’s too much work.

What I would do to insure hit, is make a trace test from a position where projectile where, to a position where it is now.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/a/8/8a858ec2c5f4a17ff390650c5e7916d57df1a056.png)
