Edward Rennie,35, told a jury that he ‘passed the time of day’ with close neighbour Welsh outside his Edinburgh West End home at around 8pm on April 17 2019.
The High Court in Edinburgh heard the chartered surveyor was going to have a cigarette afterWelsh walked away from him.
Mr Rennie said he then heard a loud sound and turned around to see a man holding a shotgun standing outside Welsh’s property.
He said the man then ran along Chester Street and headed towards Walker Street before the male “caught sight” of him.
Mr Rennie said: “He pointed the gun at me and shouted at me something like ‘don’t f*****g look at me’.”
Mr Goddard said: “What was your reaction to that?”
Mr Rennie replied: “I dived on the ground. I dived behind a parked car and peered through the glass of the car and then I ran back towards my flat.”
The witness, who said he now lived in the “Lothians”, was giving evidence on the fifth day of proceedings against 30-year-old Sean Orman, of Edinburgh,.
Orman denies murdering the T2 Trainspotting star on April 17 2019.
On Tuesday, Mr Rennie told the court he usually left his home to have a cigarette in the evenings when he stayed in Chester Street.
He stayed he lived above Welsh, who stayed in a basement flat.
Mr Rennie said: “We passed the time of day. He turned to go to his flat and he turned down the street.
“I heard a bang and turned around and saw a man standing on top of Bradley’s stairwell pointing a shotgun down the stair.
“He held it at his hip,”
Mr Rennie said he had a shotgun certificate and had some knowledge of the weapon. He said he thought the man’s shotgun was of a small calibre.
After the man told him to stop looking at him, Mr Rennie said he headed towards back the property and he concluded that Mr Welsh had been shot at “close range”.
He said he made attempts to “verify life” and phoned the emergency services.
Mr Rennie described the man with the shotgun as being in his “mid 20s to early 30s”. He also said the man was wearing a “heavy puffa jacket”.
Mr Rennie also said he thought the man with the gun looked as if he had a “fake tan”.
Last week, the jury were read the contents of a documents of evidence which had been agreed between prosecutors and Mr Orman’s lawyers.
In the statement, the lawyers agree that between March 9 2019 and April 12 2019, Orman visited a tanning salon called Indigo Sun at Fruitmarket Place in Edinburgh on nine different occasions.
During his evidence, Mr Rennie also told defence advocate Ian Duguid QC: “I’ve done my best to forget this whole event.”
Another neighbour, Lucy Stornaiuolo,37, said she ran in fear after encountering a the gunman outside Welsh’s flat.
She was returning from her work and she saw a man with his back turned to her at Welsh’s flat.
The witness added: “I saw the gun when he turned around. When he turned around, Iturned around and sprinted the other way back up towards the street.”
Mrs Stornaiuolo said she flew into a “blind panic”. She said she saw a woman and gave her a “word of warning” that there had been a shooting. She then said she took refuge outside a basement flat.
She added: “I just sat there and trembled. i didn’t hear anything. I was just terrified.”
She said her husband had heard a bang and phoned her from their home to check if she was alright.
Mrs Stornaiuolo said that she didn’t feel safe for her husband to come and get her - but he insisted and they returned back to their home.
She said she later gave a statement to the police. She said the gun looked old and resembled a ‘museum piece’.
She also said the man wore a baseball cap but was unable to provide any description of the man’s facial features.
She added: “All I could see was the gun. I never looked at the face.
“It all happened in a matter of seconds. When you see someone like that you go into a stage of panic.”
Mr Orman, pleaded not guilty to a charge of murdering Mr Welsh and 14 other charges.
Prosecutors have also brought other charges for alleged motoring offences, possessing ‘controlled’ drugs and breaching firearms legislation.
Prosecutors claim that on March 13 2019, at 1 Pitcairn Grove, Edinburgh, Orman - “whilst acting along with others to the Prosecutor unknown” wore a mask and assaulted Mr McMillan by striking him to the head and body with a machete or “similar instrument.”
It’s claimed that the assault was to Mr McMillan’s “severe injury” and “permanent” impairment and that Mr Orman attempted to murder him.
It’s also alleged on the same date at the same location Orman assaulted Mr McMillan’s 25-year-old son, also named David, by striking him on the body with a machete or similar instrument to his injury.
On April 17 2019, at 3a Chester Street, Edinburgh, prosecutors claim Orman murdered Welsh by firing a shotgun at him.
His legal team have lodged two special defences to the court.
In relation to the alleged assaults on the McMillans, Orman claims a man called Michael Sutherland “and others.. unknown” were responsible for the alleged attacks.
Orman’s legal team claims that at the time Welsh was shot, he was not in Chester Street but was “elsewhere” travelling alone on a “cycle” between Longstone in Edinburgh and Kirknewton, West Lothian.
The trial, before judge Lord Beckett, continues.