# Need help to fix broken bullet system

**URL:** <https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575>\
**Category:** World Creation\
**Tags:** gun, unreal-engine, transform, Physics, spawning-actors, projectile, question\
**Created:** [November 3, 2021, 10:08pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575 "2021-11-03T22:08:22Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neeck\_Kola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Neeck\_Kola](https://forums.unrealengine.com/u/Neeck_Kola)\
**Post date:** [November 3, 2021, 10:08pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/1 "2021-11-03T22:08:22Z")

</div>

Hello guys, i have a problem, in my game i have a gun, gun has a muzzle, I need the bullet to spawn from the muzzle, it works correctly only when i tap shoot button many times, but if i hold the button, the muzzle returns to location like if it in editor, i dont know how it works, because i dont change muzzle transform, help pls with this, thanks in advance

 ![351592-screenshot-1303.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/7/8070db115f9110f9fdc147c44af6a5b5c51b420d.png)

 ![351593-screenshot-1304.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/9/629f0acae2f4a972470a23a4ae98c26368231f64.png)

alt text

 ![351595-screenshot-1305.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/c/b5cbc48cc86803a6995f3d0cab6932051a088d1e.png)

 ![351596-screenshot-1306.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/2/c0222b3deaef283eedfd87d2879d4b2e7e3d92b5.jpeg)

 ![351597-screenshot-1307.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/1/a/01a66b05f6a87064634d716afe80d1f48a5ac96a.jpeg)

on last picture the player is turned to -180 degrees, but print string returns zero rotation, it impossible because spawned gun is attached to player and become a child to player, just like muzzle is child to gun, so if player turn to -180 deg then muzzle must turn -180, but if hold the button it returns to zero rotation and different location then actual muzzle

---

<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:** [November 4, 2021, 7:42am UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/2 "2021-11-04T07:42:15Z")

</div>

I don’t know exaclty what the problem is, but I see two things that might need attention:

1. Get all actors of class on tick!? How many are there? You don’t need to cast, because it’s already the right class of object ( hence the blue warning ). Can you just get it once and set the variable?

2. Here

 ![351605-screenshot-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/e/17e37ec8659109b7d9698e4582f84d0af16fce4f.jpeg)

It will open the gate, then call 1 in the seq, and not wait for any time before calling 2. Delay is a latency node ( hence the little clock in the corner ). That means execution carries on, the system will not wait for it.

---

<div class="post-metadata">

**Author:** ![Neeck\_Kola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Neeck\_Kola](https://forums.unrealengine.com/u/Neeck_Kola)\
**Post date:** [November 4, 2021, 2:59pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/3 "2021-11-04T14:59:15Z")

</div>

Ok, the first comment i fixed, thanks, but i dont understand second one, my knowledge of english is not enough to understand this, can you rephrase the question pls?)

---

<div class="post-metadata">

**Author:** ![Neeck\_Kola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Neeck\_Kola](https://forums.unrealengine.com/u/Neeck_Kola)\
**Post date:** [November 4, 2021, 3:03pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/4 "2021-11-04T15:03:20Z")

</div>

I know how delay works, I dont understand what kind of mistake I made in this code.

---

<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:** [November 4, 2021, 3:44pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/5 "2021-11-04T15:44:21Z")

</div>

Sorry 🙂

The sequence node won’t wait for the delay.

The moment pin 1 has started running, pin 2 will run, and the delay will have no effect.

More this kind of thing

 ![351642-screenshot-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/b/8/8b8aaabbd5c903aa12e44738d24feb44a21ac322.jpeg)

But I also suspect you’ll a DoOnce in there somewhere too.

---

<div class="post-metadata">

**Author:** ![Neeck\_Kola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Neeck\_Kola](https://forums.unrealengine.com/u/Neeck_Kola)\
**Post date:** [November 4, 2021, 3:57pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/6 "2021-11-04T15:57:41Z")

</div>

aaa, i unterstood you, I thought you about another sequence

---

<div class="post-metadata">

**Author:** ![Neeck\_Kola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Neeck\_Kola](https://forums.unrealengine.com/u/Neeck_Kola)\
**Post date:** [November 5, 2021, 5:34pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/7 "2021-11-05T17:34:00Z")

</div>

I narrowed my search down to this function

 ![351595-screenshot-1305.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/c/b5cbc48cc86803a6995f3d0cab6932051a088d1e.png)

The problem in muzzle scene or in smt else, i tried to change scene to static mesh, all kinds collisions but in print string always stay 0 0 0

---

<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:** [November 5, 2021, 6:23pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/8 "2021-11-05T18:23:12Z")

</div>

hmmm, doesn’t make sense…

---

<div class="post-metadata">

**Author:** ![Neeck\_Kola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Neeck\_Kola](https://forums.unrealengine.com/u/Neeck_Kola)\
**Post date:** [November 5, 2021, 7:00pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/9 "2021-11-05T19:00:51Z")

</div>

Wtf

 ![351696-screenshot-1309.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/6/0263caffb59e88a66eecd164aff11e760738c2cd.jpeg)

 ![351697-screenshot-1310.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/e/2/be2cf456ba76dd5664f4b51b93a24fd4f81af691.jpeg)

---

<div class="post-metadata">

**Author:** ![Neeck\_Kola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Neeck\_Kola](https://forums.unrealengine.com/u/Neeck_Kola)\
**Post date:** [November 5, 2021, 7:01pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/10 "2021-11-05T19:01:21Z")

</div>

It dont casting at all

---

<div class="post-metadata">

**Author:** ![Neeck\_Kola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Neeck\_Kola](https://forums.unrealengine.com/u/Neeck_Kola)\
**Post date:** [November 5, 2021, 7:04pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/11 "2021-11-05T19:04:38Z")

</div>

![351698-screenshot-1311.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/6/036a988a7b984e449d61c2c4a765fadf72f98911.jpeg)

Is it casting?!

 ![351699-dsmgakwmehxe9qujtq-ys30pnftgnmsruhuo-muzgcg.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/6/3/86339068a49f861833503df206c97e9ea8e71a82.jpeg)

---

<div class="post-metadata">

**Author:** ![Neeck\_Kola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Neeck\_Kola](https://forums.unrealengine.com/u/Neeck_Kola)\
**Post date:** [November 5, 2021, 7:13pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/12 "2021-11-05T19:13:03Z")

</div>

Ok. with variable it starts work, but what to do with the location

 ![351711-screenshot-1314.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/3/da328da0aee22e0f752eafedd02b6e1db2d33d70.png)

---

<div class="post-metadata">

**Author:** ![Neeck\_Kola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Neeck\_Kola](https://forums.unrealengine.com/u/Neeck_Kola)\
**Post date:** [December 3, 2021, 6:58pm UTC](https://forums.unrealengine.com/t/need-help-to-fix-broken-bullet-system/490575/13 "2021-12-03T18:58:24Z")

</div>

I just switched pre physics

 ![353504-screenshot-1334.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/d/7/4d749c80dbd6c7912741c1e816994ef807f2c424.png)

to during physics and it starts work
