Download

Projectile is not hitting directly where the crosshair is pointed

I have a problem whereby whenever I fire off my projectile it does not land where the crosshair is pointed.
0aa15a75038c09c1e6ff16cd4d8e127810eb45cc.png
cc80b54b3400ce10977b60732cb955154f72b1ee.png

Here is the blueprint for my projectile. Basically I fire off the projectile and it spawns a static mesh version of the projectile at the hit point and the destroys the flying projectile so that they are not two of them.

be7669e7c09ccd735c79c884aefb81ed28c174a5.png3acef3532535685fe72fbe7aaf62626d15e406e4.png77c8205a4be373c76dc28f20a427ecd1d73fe006.png16b120a5e2406f3a9e8b25ebb406cb9c1ed15c3e.png

Can someone please help me solve this problem?
I am kind of a newbie. Thanks in advance

In our projectile handling, OnBeginOverlap triggers everything, and we simply use collider’s world location to spawn effects, rather than tracing again to work out where to spawn it.

Double check that your static mesh has pivot where it should have it (and not off by the amount of error you’re seeing)

Welcome to unreal forums! And great job screenshotting your question!

Did you offset your cross hair in your HUD? The default FPS project doesn’t have a centered crosshair, if you built off that then your crosshair will also not be centered.

The top left corner of the texture is the middle of the screen, so you need to offset its location by -8/-8 (half the texture resolution x and y) to make the center of the texture the middle

It’s a silly error that has persisted for as long as the FPS project has existed

Do you trace your crosshair to an actual surface of the target in the world? Your bow is to the left from the camera and if you spawn your arrow at position of the bow then it’s already offset from the center of the screen.

Thanks for the replies guys!
It turned out that my Gun Offset vector values were not correct so I fixed them and now it works perfectly!