The confrontation is documented in reports released this week by the West Valley City Police Department, whose officers were cleared of wrongdoing by the Salt Lake County District Attorney's Office.
The D.A. ruled the two police officers were within the law when they shot and killed Cotton on Aug. 22.
The reports do not pinpoint what motivated Cotton, 22, to aim at an officer that morning.
"Only Mr. Cotton knows that," West Valley police Capt. Tom McLachlan said Thursday.
The reports note Cotton had outstanding warrants in California and methamphetamine was found in his car. He also had been booked into the Salt Lake County jail in July on suspicion of drug and fraud charges.
Cotton was sleeping in the driver's seat of a Mitsubishi Eclipse parked at a 7-Eleven at 4807 W. 3500 South when Officer Kevin Salmon visited the store for a drink about 7 a.m. and saw Cotton sleeping in the car. The store employees said it was OK for Cotton to be there and Salmon returned to duty.
When Salmon returned to the store about two hours later, Cotton was still asleep. The employees wanted him to leave because he was in the handicap parking stall.
Salmon called for assistance and knocked on Cotton's driver's window. Officer Tyler Longman arrived.
Cotton awoke and acted nervously and was unable to provide identification, Salmon later told detectives. Salmon asked if there were any weapons in the car then saw what he thought was a handgun in Cotton's lap.
Salmon said Cotton was holding the handgun and might have accidentally fired a round into the car's floor. Then, Salmon said, Cotton turned the gun toward him.
Salmon began moving backward, drew his 9mm sidearm and began firing.
Longman was at the car's rear when he heard a pop. Longman looked at Cotton and saw Cotton pointing a gun out the driver's window. Longman moved to the passenger side and fired at the Cotton with a .40-caliber handgun. Cotton turned toward Longman and Longman continued firing until he saw that Cotton had stopped moving. He was pronounced dead at the scene.
A police officer who responded after the shooting noted Cotton suffered a gunshot wound to the left side of his head, near the ear. The medical examiner found six bullet projectiles in Cotton's head and neck, but the report does not specify how many might have been fragments from the same bullet.
A 9mm pistol was found in Cotton's lap, according to the police reports. A casing was jammed in the ejector port.
Investigators found 13 such 9mm casings and eight .40-caliber casings.