How to eject shell casings out of a socket?

Add impulse takes a value in world space (afaik) so likely you just need to multiply your impulse vector by the forward vector of your gun.