I have followed several of the tutorials on you tube about how to fire a projectile. I attached a gun to the right hand of my character, and set up the blue print to fire the projectile. But no matter what I tweak I can not seem to figure out how to get the projectile to fire out of the weapon instead of the middle of my characters body. I am still very new to blueprint, so im sure I am missing something. I am now going on day 3 of having bullets shoot out of my guys privates lol. Any help is greatly appreciated.
I haven’t worked on this specifically - but generally when you create the projectile you would want to spawn the actor with the transform of the point you want it to fire from your gun.
Yeah, you need to find the current world position & transform of the guns muzzle, and spawn your projectile with that transform.
A good way to do it, is add a socket to your weapon mesh, then retrieve the world position and transform of that socket when you fire the weapon, and transfer that data too the projectile on spawn.
still messing with this and can’t quite figure it out. Do you know of any example blueprints I could look at? I am trying to do this on a third person character if that makes a difference. Thanks for your help with this. I have also attached a picture of the blueprint that is in there to make it shoot out of his midsection…
Edit the skeleton you’re using, find the location best suited for your muzzle and make a socket called muzzle. Then launch your projectile from the position of that socket.
Have you check the FPS BP project?
You can also check this tutorial: turret.
The shooting BP logic is the same, the only difference is that in this tutorial he set the sockets in a static mesh, so all you need is to set the socket in the skeleton instead of the static mesh, as Drexciya said, and use the same bp logic.