Autoaim, autotracking

ive not tried implementing this yet but how would i make an autoaim system that adjusts the position on the crosshair, not the camera?

bascially the smartgun from aliens. the positioning of the model and its point of impact update, but the camera remains independant.

Input fire, get closest enemy, line trace from camera to enemy