Thanks for sharing, i’ll check it out. Just to clarify tho, i’m not trying to just align the shot from the gun muzzle to target but instead the whole gun.
As seen in Metal Gear Online 2 and i think Metal Gear Online 3. Not sure of the top of my head if some other game is also doing that, i’m sure there’s plenty enough doing the same thing.
But yeah, it’s a clear mistake on my part. I am aligning the gun from it’s attached socket and technically it actually is spot on. What i didn’t think about was that the muzzle is not perfectly centered with the attached socket so shooting a line trace from the muzzle forward shows the slight offset. I need to somehow compensate for that but i got no clue how.
So essentially, i need to take in account where the weapon pivot and muzzle is and align that to the camera line trace hit location. Any pointers how to do that?
I cleaned up and put it into a function. xD
Thanks Rev0verDrive, i applied some solutions from your BP.
Complete BP
Cam line trace
Alignment
What should i add to the alignment part to account for the muzzle offset between the weapon socket and the cam hit trace?
In any case, thank you so much!


