3rdP or 1stP which gun actually fires?

I was going through the shooter game example again, I disabled bOwnerNoSee for 3rd person meshes and ejected the pawn to see the relation between 1stp and 3rdP meshes.

1.I saw that the 1stp and 3rdP guns are actually aiming at different points!!

  1. If I hit fire without aim targeting the bullets seemed to be coming from the barrel of 3rdP gun mesh

  2. Firing while aiming down the sights showed that gunfire was coming from the barrel of 1stP gun
    mesh

4.If You observer the shooter as another player you see that the bullets always seem to be coming from the 3rd person mesh towards you , but the shooting player is actually seeing the bullets going out from his 1stp gun to the target!

Can someone give me a general overview of whats going on?

I do realize that both gun meshes spawn the cosmetic fire effects but which one actually spawns the projectile/makes trace? and how does the non-shooting gun mesh makes it appear like the bullets(Tracer bullet flashes) is coming from it and not from the 1stp gun mesh?

It have 2 type is Instant and Projectile.

Instant it super simple, 1st shoot it checking start point it 1st gun point and shoot a ray to check for the impact point, then it will send to server for confirmation, server then send for all client end point of the bullet, then 3rd just take their gun point as start and end point from server and make a trail effect when shooting, So you will see this will be pretty accurate for both side.

The Projectile is individual actor, it will be created on server and replicated for all client.
So 1st shoot it will call server to spawn a bullet with start point it 1st gun’s point and direction it where you aim, and from 3rd person it just spawn the effect when shoot, this one will be less accurate if the gun point of 1st and 3rd are different, you will see bullet not coming from 3rd gun point some time, but it still ensure you gonna hit the same spot for all client and server.