FPS games - kinda general help with gun models and aiming down sights

I’ve found a lot of specific answers with this but what I’m looking for is more of a general approach to these:

  • When modeling the gun, should I model the hands holding it too?
  • Would that mean I’d have two gun models with a set of animations for both aiming and hip
  • Is there an easy way to make the models dynamic so that I can just add a gun with an origin at some point and it be placed correctly and aim correctly with the same aim/hip fire code?

You don’t really have to answer all those questions, I’m just trying to figure out how big games handle multiple guns.

Like battle royal games, you’re constantly picking up new weapons and such and it seems tedious to have to do what I am currently doing now which is adding the gun then, depending on the gun, offsetting it so it lines up for hip position then having variables on a gun class for that weapon which tell how far to move the gun when aiming to be in middle of the screen looking down the sights.

Ok so typically how you would approach this, at least for a first person game, is you would create a model for the players arms. You would also add two extra joint to the palms of the hands for animating the gun. The gun itself would be a separate model. You would then create animations using the same model, or at least a model with an identical skeleton. You would create different animations for each key sequence so yes hip fire, aiming down sights, reloading, etc. Different guns would require different versions of these animations in order to match correctly with smaller guns vs larger ones, or those with different overall hand placement and recoil. If two guns are similar enough such as an AK and an assault rifle, you could likely use the same animations.
In game you would attach the gun model to the two extra joints and they would then animate the weapon for you. You might even only need one joint. I hope this helps!