fps raycasting

Can someone please explain how fps raycast shooting is implemented. Is the raycast meant to start from the barrel, and if so where should the end hit point be ?

No, the FPS Raycasting is actually meant to start from the camera. Check out this link for how exactly to Raycast: Unity - Scripting API: Physics.Raycast

Thank You

P.S If you want to debug the Raycast and see it in the scene view, this should help: Unity - Scripting API: Debug.DrawRay