He said two other people were urinating next to a log and the pellet hit one of them in the heart.
Justice Brewer said it was not clear whether Williams knew the two people were there or what he was thinking when he is alleged to have fired the air rifle.
The judge said Williams had told police he was aiming at a can on the log.
He has been remanded on bail and is due to stand trial in May next year.
Detective Inspector Dave Lynch has previously said the airgun allegedly used by Williams was bought legally and was not covered by laws surrounding high-powered air rifles.
"In general terms it would appear that some people still have the perception that airguns are toys."
He said he was aware of three recent cases in which people had been shot by airguns.