Projectile does not travel to the center of the crosshair

Hi! I am trying to create a shooting game using a projectile firing system. Whenever I spawn a projectile from the location and rotation of a muzzle socket on the weapon mesh, the projectile does not travel to the center of the crosshair. Is there anyway to spawn a projectile from the muzzle socket, but travel to the center of the screen. I am trying to code this from C++. Please share your solution and code with me as soon as possible. Thank you!

Had a long thread about this some time ago: how-can-i-shoot-at-the-center-of-my-crosshair-c.html

In short, you can’t convert a 3d problem (world location of muzzle) to 2d (crosshair on screen) without deciding on specifically how you want to get rid of that pesky third dimension. In addition to the options provided in the link, I thought of another one: As soon as you fire the projectile, record your aim direction vector in world space (from the crosshair to some arbitrary point forward in your aim direction) and have the projectile move in a curve from its starting position to join this vector. Once it touches that vector set its direction to that vector. I haven’t tried it myself but it could be an interesting solution.

Thank you for your help. I experimented with what you proposed and I am happy to say that it worked out.

If you’re happy with the answer would you please accept it so this question shows as resolved?

Hello, I’ve been experiencing this problem with no avail. Can you please post a blueprint of this solution.