Shoot a ray cast from the camera center into the world and get the collision point. Then use another ray cast from the barrel of the gun to the found collision point (you might want to orient the gun/arm using look_at so it looks more realistic, but it depends on your art setup).
Alternatively, you can fake it, and just use the camera center ray cast to handle the shoot/collide logic (you can have a tracer/muzzle flash come off the gun, users probably wouldn't notice). This is definitely less realistic, but it would make some of the math easier.