Bullet goes to the wrong direction!

The bullet needs to spawn from the camera in the direction the camera is facing. If you want the bullet particle or material to seem like it’s coming from the barrel you can use a WPO in the material.

I added projectile on my first person blueprint and the projectile spawns on the gun. There is a socket in the gun. When I fire, the projectile goes to the a little bit up. I moved socket down, but it still goes a little bit up.
Although I move the socket down, the bullet goes up as it speeds. As I understand it, projectile is spawned on the socket and then that socket goes to the location of Rig’s connected. (Maybe I wrong)

VIDEO:

You didn’t understand me. (cause my english isn’t good.) the problem is not the material, or particle problem. the problem is center problem. when I shoot, I wanna see the bullet on the aim direction. but the bullet doesn’t go through the center direction. the bullet goes above aim (as seen in the video). do you know that how can i center the bullet? thank you marcis.

I understood what you meant. The problem is that you’re spawning the projectile from the socket of the gun. If you want it to align with your crosshair you need to spawn it from the camera location.

First off move your bullet socket to the muzzle of the gun.

Next you’ll create a function that returns the projectile transform using a line trace from camera and the look at rotation of the bullet socket. The returned transform will aim the projectile at the crosshairs. This works in FPP/TPP and ADS.

Simply call this function and pipe the returned transform to the spawn actor transform.

you are a super bro! problem is solved. And there was also an aim problem, I was very surprised. the aim was a little up. hahahaha

you are a king.