Gun Socket Bounce?

How would I make the gun ‘bounce’ on the players back?
Like in this video:

I’m gonna guess they put a physics constraint on the player’s back and attached the weapon as a physics object to that. It seems to bounce like it’s on a hinge.