Best way to make full auto ray casting?

For an FPS im working on, what would be the best way to make full auto ray casting? And is there any tutorials or such on it that anyone can recommend