# Why I can't spawn my bullet

**URL:** <https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086>\
**Category:** Game Production\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [February 3, 2025, 3:23pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086 "2025-02-03T15:23:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aga45678](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aga45678](https://forums.unrealengine.com/u/Aga45678)\
**Post date:** [February 3, 2025, 3:23pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/1 "2025-02-03T15:23:00Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/4/d/14d13d63409c0cc67b3408e24c2d88a8052cf433.png)  
This is my gun’s blueprint. Why this doesn’t spawn the bullet actor? I am sure that my input action works but this part doesnt work at all.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [February 3, 2025, 3:25pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/2 "2025-02-03T15:25:28Z")

</div>

put a print string after the spawn to check if it is triggered.  
Make sure BP bullet has it’s static mesh setup correctly to see the bullet.

---

<div class="post-metadata">

**Author:** ![Aga45678](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aga45678](https://forums.unrealengine.com/u/Aga45678)\
**Post date:** [February 3, 2025, 3:28pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/3 "2025-02-03T15:28:32Z")

</div>

Yea I was sure because I saw it works fine on showdebug input. But It doesn’t trigger somehow. The things I did is create IA\_Fire, add it to Input mapping and thats all.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [February 3, 2025, 3:33pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/4 "2025-02-03T15:33:46Z")

</div>

and you have the input mapping setup =\> Enhanced input subsystem =\> add context mapping =\> your mapping picked

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 3, 2025, 3:34pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/5 "2025-02-03T15:34:32Z")

</div>

> This is my gun’s blueprint.

What BP is this? Non-possessed **Pawns** do not process input. Actors do not process it at all unless enabled explicitly. If the gun is just an actor, it won’t fire.

- either enable input on the gun
- or have the pawn / controller handle firing and tell the gun to fire via a custom event

---

<div class="post-metadata">

**Author:** ![Aga45678](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aga45678](https://forums.unrealengine.com/u/Aga45678)\
**Post date:** [February 3, 2025, 3:38pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/6 "2025-02-03T15:38:38Z")

</div>

Yeah this is an actor blueprint. How do i enable input?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [February 3, 2025, 3:39pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/7 "2025-02-03T15:39:37Z")

</div>

You don’t. You should have your player controller or player pawn trigger the event through a reference.

You can enable auto input for controller 0 but it’s a hacky way that should only be used for testing.

---

<div class="post-metadata">

**Author:** ![Aga45678](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aga45678](https://forums.unrealengine.com/u/Aga45678)\
**Post date:** [February 3, 2025, 3:41pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/8 "2025-02-03T15:41:26Z")

</div>

In the video I watched he was doing the hacky way. So I think I should put these codes to my character right?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [February 3, 2025, 3:42pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/9 "2025-02-03T15:42:08Z")

</div>

Yes the character holds the weapon and they should be the trigger to fie it.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 3, 2025, 3:43pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/10 "2025-02-03T15:43:18Z")

</div>

> [@3dRaven](#):
>
> You can enable auto input for controller 0 but it’s a hacky way that should only be used for testing.

Seconded. @Aga45678 Let’s say you enable input and add a second gun, now you have a much more complicated issue where 2 actors fight for input priority. If there is one gun only in the entire game, that’d could work OK-ish.

> [@Aga45678](#):
>
> So I think I should put these codes to my character right?

Yup, the character surely knows which weapon is active / equipped.

---

<div class="post-metadata">

**Author:** ![Aga45678](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aga45678](https://forums.unrealengine.com/u/Aga45678)\
**Post date:** [February 3, 2025, 3:52pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/11 "2025-02-03T15:52:45Z")

</div>

Btw how do i get the new location of gun everywhere I go? It disappears when i pick it up but when i get the location of it, it calculates the old location

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 3, 2025, 3:54pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/12 "2025-02-03T15:54:51Z")

</div>

How do you pick it up?

---

<div class="post-metadata">

**Author:** ![Aga45678](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aga45678](https://forums.unrealengine.com/u/Aga45678)\
**Post date:** [February 3, 2025, 3:56pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/13 "2025-02-03T15:56:20Z")

</div>

I attach it’s mesh to my hand socket

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 3, 2025, 3:57pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/14 "2025-02-03T15:57:25Z")

</div>

What node is used to pick up the gun? Begin Overlap? If so, where? In which BP?

> Btw how do i get the new location of gun everywhere I go?

And you may need to elaborate on what this means, precisely?

---

<div class="post-metadata">

**Author:** ![Aga45678](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aga45678](https://forums.unrealengine.com/u/Aga45678)\
**Post date:** [February 3, 2025, 4:00pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/15 "2025-02-03T16:00:03Z")

</div>

I did these in c++

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/3/17399d48892ecdef84b8ea957ed205cc86d1257b.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/5/4c5bba06f5fc4651d2e89b9f9a340c3b046c9dbc.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/c/e/cce28dc3e3232093496aace087624094ad223451.png)

When I shoot it shoots from it’s location where I picked it up. How do i shoot from where I attached it to?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 3, 2025, 4:03pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/16 "2025-02-03T16:03:51Z")

</div>

> [@Aga45678](#):
>
> When I shoot it shoots from it’s location where I picked it up. How do i shoot from where I attached it to?

Normally, you’d add a socket to the gun mesh or place a scene component indicating muzzle location. Spawn bullet at that world location (you may also want to work in direction).

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [February 3, 2025, 4:03pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/17 "2025-02-03T16:03:52Z")

</div>

On overlap you should save the weapon as a reference to a UPROPERTY in your character.  
You can then access the weapon (and it’s socket location) when firing.

---

<div class="post-metadata">

**Author:** ![Aga45678](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aga45678](https://forums.unrealengine.com/u/Aga45678)\
**Post date:** [February 3, 2025, 4:23pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/18 "2025-02-03T16:23:05Z")

</div>

So I created this variable at gun class header  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/4/e741c5cc381e1f6aed514adcbd20eef1907d3e80.png)  
Now what I need to do?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [February 3, 2025, 4:25pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/19 "2025-02-03T16:25:07Z")

</div>

It needs to be in the character’s header. The character equips the weapon 😉

---

<div class="post-metadata">

**Author:** ![Aga45678](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aga45678](https://forums.unrealengine.com/u/Aga45678)\
**Post date:** [February 3, 2025, 4:38pm UTC](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086/20 "2025-02-03T16:38:58Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/4/e/24eefca2f0719b4d12cb92a4b5856ce65e5663da.png)  
I made it like this now I can reach it from blueprint. But still when I do like this it spawns on old location  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/2/a/e2a03a8175f94bd9476f168fcc8b701fbb88aaaa.png)

[Next page](https://forums.unrealengine.com/t/why-i-cant-spawn-my-bullet/2316086.md?page=2)
