The shooter apparently walked into a building and began firing a .45-caliber semi-automatic pistol. He then got into a vehicle and continued firing before entering another building.
He was eventually confronted by military police in a parking lot. As he came within 20 feet of an officer, the gunman put his hands up but then reached under his jacket and pulled out his gun. The officer drew her own weapon, and the suspect put his gun to his head and pulled the trigger a final time, according to Lt. Gen. Mark A. Milley, senior officer on the base.
How do you understand the line that's in bold? Specifically, I'm interested in understanding it grammatically, plus visualization of the process. For instance, how do you imagine the idea of coming within a certain number of units of someone or something?