# Resolving Infinite Loop in Retro Style Asteroids Game

**URL:** <https://forums.unrealengine.com/t/resolving-infinite-loop-in-retro-style-asteroids-game/2727070>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [June 7, 2026, 11:25pm UTC](https://forums.unrealengine.com/t/resolving-infinite-loop-in-retro-style-asteroids-game/2727070 "2026-06-07T23:25:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![HadeskillerParag](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HadeskillerParag](https://forums.unrealengine.com/u/HadeskillerParag)\
**Post date:** [June 7, 2026, 11:25pm UTC](https://forums.unrealengine.com/t/resolving-infinite-loop-in-retro-style-asteroids-game/2727070/1 "2026-06-07T23:25:47Z")

</div>

Hey there,

I am working on a retro style asteroids game in UE5.3.2 and I have an infinite loop in my BP\_AsteroidLarge BeginPlay event but I’m unsure why it’s throwing the infinite loop with regards to the projectile firing.

I will attach a screenshot of what I have, any help resolving this issue would be greatly welcomed.

I am not very experienced in Unreal Engine development and am teaching myself but that has only gotten me so far.

 ![image_2026-06-07_152052899](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/0/b60b07f9b934fbf0bed6b0be3a70d04dab61240c.png)

---

<div class="post-metadata">

**Author:** ![Lokstrel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lokstrel](https://forums.unrealengine.com/u/Lokstrel)\
**Post date:** [June 8, 2026, 9:45am UTC](https://forums.unrealengine.com/t/resolving-infinite-loop-in-retro-style-asteroids-game/2727070/2 "2026-06-08T09:45:38Z")

</div>

Hi, I think that it is not BeginPlay that causes the infinite loop. Does it still throw infinite loop when you disconnect BeginPlay?  
Does it interact with something else? Like OnOverlap or OnHit?

---

<div class="post-metadata">

**Author:** ![BRGEzedeRocco](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/brgezederocco/32/1216890_2.png) [@BRGEzedeRocco](https://forums.unrealengine.com/u/BRGEzedeRocco)\
**Post date:** [June 8, 2026, 4:10pm UTC](https://forums.unrealengine.com/t/resolving-infinite-loop-in-retro-style-asteroids-game/2727070/3 "2026-06-08T16:10:26Z")

</div>

Hello @HadeskillerParag ,  
From what I can see in the screenshot, there doesn’t appear to be an infinite loop in this Blueprint. It’s possible that the issue is occurring when the asteroid is being spawned.

Could you show the Blueprint where you are spawning the asteroid ?

A video showing the error you’re encountering could also be helpful.

---

<div class="post-metadata">

**Author:** ![HadeskillerParag](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HadeskillerParag](https://forums.unrealengine.com/u/HadeskillerParag)\
**Post date:** [June 10, 2026, 7:46pm UTC](https://forums.unrealengine.com/t/resolving-infinite-loop-in-retro-style-asteroids-game/2727070/4 "2026-06-10T19:46:54Z")

</div>

I have tested, it’s not BeginPlay so I think it is the OnComponentBeginOverlap with the bullet sphere collision component but it doesn’t even fire the bullet which is the odd part

---

<div class="post-metadata">

**Author:** ![HadeskillerParag](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HadeskillerParag](https://forums.unrealengine.com/u/HadeskillerParag)\
**Post date:** [June 10, 2026, 7:56pm UTC](https://forums.unrealengine.com/t/resolving-infinite-loop-in-retro-style-asteroids-game/2727070/5 "2026-06-10T19:56:12Z")

</div>

here it is, not sure but I think it may be in the OnComponentBeginOverlap for the bullet’s sphere collision component I added so might just scrap that idea entirely. it worked fine before trying that idea [https://youtu.be/6lr\_bIqYBYQ](https://youtu.be/6lr_bIqYBYQ)

---

<div class="post-metadata">

**Author:** ![Dejan33](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dejan33/32/1194514_2.png) [@Dejan33](https://forums.unrealengine.com/u/Dejan33)\
**Post date:** [June 10, 2026, 8:38pm UTC](https://forums.unrealengine.com/t/resolving-infinite-loop-in-retro-style-asteroids-game/2727070/6 "2026-06-10T20:38:54Z")

</div>

You may be spawning too many asteroids somewhere.

---

<div class="post-metadata">

**Author:** ![HadeskillerParag](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HadeskillerParag](https://forums.unrealengine.com/u/HadeskillerParag)\
**Post date:** [June 11, 2026, 4:02am UTC](https://forums.unrealengine.com/t/resolving-infinite-loop-in-retro-style-asteroids-game/2727070/7 "2026-06-11T04:02:43Z")

</div>

it went back to normal after i removed the sphere collision and the overlap associated with it so it definitely was not the spawning too many asteroids otherwise it’d still be an issue
