Which is better to raycast directions for guns?

im working with a developer team to create a Kaiju No.8 Fan game, and we’re using an OTS third person gun system. We’re in the process of scripting it, and when it comes to scripting the raycast’s direction (bullet’s direction), im unsure if i should use the mouse’s position, the raycast’s origin’s look vector (attachment), or something else? in general im curious on what’s the best way to calculate/set the direction of the bullet for a TPS gun system? this is the first one i’ve really had to keep it only OTS and third person sooo any tips would be greatly appreciated :D.

(we’re trying to make it mouse-locked so it would be stuck to the center of the screen, but camera offset is something that im accounting when it comes to raycast direction)

you could use ScreenPointToRay on the mouse’s position