I’m currently trying to get the third person aiming working but I have a strange issue. I want to fire a line trace from the camera to wherever the camera is actually aiming to. Then make a line trace from the weapon end to where the camera line trace hit. One would think this would lead to a line trace from the end to the center of the screen but oddly it’s offset to the left.
Bewcause this is 3rd person setup. You shoot from weapons barrel/muzzle not from camera.
So to properly aim and still shoot from weapon, not camera:
line trace from camera, find location where CAMERA is aiming
find look at rotation for weapon and character
use that to animate upper half of character with weapon properly, so weapon shoots at exact spot where camera is aiming.
But then you will have problem when character is facing wall close to it. Joys of making very accurate animations. Do not overdo it, you do not want perfect reloading magazines (and handling weapons) simulation as a game, which sadly some indie shooters do instead of fun gameplay.
The rotation is certainly a later change for me to ensure the player fires correctly. I currently want to just get aiming accurate so I can then add more functionality to the gun that relates to my idea.
For now, my issue is related to initial camera line trace where the first line trace from the Follow Camera origin to 15000 x Camera forward vector is aiming to the left of the center of the screen. This is the green dot in the play image.
May not be related: but be also mindful of how the reticle is drawn. Widgets, for example, are often placed in screenspace using their upper left corner, a 32x32 widget should be offset by -16,-16 px. Again, this may be irrelevant here and is implementation dependent. Only mentioning it since it was done incorrectly in UE4 templates and kept throwing people ('s aim) off, so to speak.