Cant get proper trajectory for bullets fired.

I’m trying to create an aim mode, with an over-the-shoulder camera.
Right now when aiming, I raycast from the shoulder camera towards the center of the screen.

My gun, and bullet spawn point are on a different transform.

Once I Instantiate a bullet, I call the LookAt(raycasthit.point) on the RigidBody of the instantiated object and add force to shoot.

Problem is, that the path that my bullet travels is obviously different from the ray from the shoulder camera, resulting in inaccurate shots.

How do i get a proper trajectory independent of where the bullet spawn point is?

My code:

    void ShootMethod()
        Ray ray = ShoulderCam.ViewportPointToRay(new Vector3(0.5F, 0.5F, 0));
        RaycastHit hit;
        Vector3 AimpPoint;

        if (Physics.Raycast(ray, out hit))
            if (hit.point != null)
                AimpPoint = hit.point;
                //2000 maybe not enough
                AimpPoint = ray.GetPoint(2000);

        var bulletclone = Instantiate(bulletPrefab, barrelLocation.position, Quaternion.identity);
        var tempFlash = Instantiate(muzzleFlashPrefab, barrelLocation.position, barrelLocation.rotation);

        bulletclone.GetComponent<Rigidbody>().AddRelativeForce(bulletclone.transform.forward * shotPower);

        Destroy(bulletclone, 10f);
        Destroy(tempFlash, 0.5f);


Hopefully my question is clear.

The first parameter for Physics.Raycast is origin which is the starting point of the ray, you need this to be yourBulletSpawnPoint.transform.position.

this is a classic TPS problem…
Reticle is on the camera… and you raycast from the camera…
bullet is from the gun… and should travel forwards along vector . forward, from the muzzle position.
but then it might not hit the same point the camera is looking at.
Its a good idea not to use force. to move it… but just a speed, and the forward vector from the muzzle.

If you bullet is invisible… (say like counterstrike) just do the impact/collision from the camera view.
but it will still look odd sometimes… like camera will see over a wall and player can hit something technically they shouldnt.

Or let user shoot from muzzle but aim with camera… bullet will be correct, but often will not hit where camera is looking. (say the aforementioned wall. )

Soln I like… trace they raycast from the muzzle, and shoot the bullet from same forward vector from the muzzle. raycast hit the ray to scene, and put the reticle there in the scene… or do worldToView to get a Ui point at which to place the reticle… the reticle moves about but its perfect.
alternately make the reticle a lazer dot in the real world on each surface it points at.