Try as he might, James Heatly could not achieve perfection when little else would suffice.

Hours spent in the deep of the diving pool and dry land of the trampoline within Edinburgh’s Commonwealth Pool, the 24-year-old rocked up for the men’s 3m springboard final with a bounce in his step following fourth place in his morning semi-final.

His first and his last attempts sank to bottom of the scoring. Just not quite his day. Instead it was his British team-mate Jack Laugher who flew the flag, completing an extraordinary medal set following gold and silver at Rio 2016 with the 26-year-old Yorkshireman accompanying Chinese duo Siyi Xie and Zongyuan Wang onto the podium.

“It’s frustrating,” said Heatly, now the same age as his illustrious late grandfather Peter when he competed at the 1948 Games in London. “There’s definitely a lot more in the tank. I’m a bit gutted I didn’t put it all out there. But the pros outweigh the cons. Sometimes you win, sometimes you learn and today I learnt.”

The Scot qualified in fourth from the morning semis but his opening dive, a back somersault, hit the water awkwardly. He regrouped, with his coach Jen Leeming pouring guidance into his ear.

However the European and Commonwealth medallist simply could not make up lost ground despite an excellent fifth-round effort that took him as high as seventh, finishing with 411.00, some 147.75 behind Xie, who purloined his second gold here after he and Wang won the 3m synchro together last week.

For Laugher, this was perhaps genuinely pivotal following the loss of his synchro crown to the Chinese with a sub-par seventh place with Dan Goodfellow. His final dive at the 2019 world championships was enough for bronze but it signalled an outbreak of the sport’s equivalent of the yips. The anxiety affected his mental health and well-being, his confidence shot

“I kept making that same mistake over and over again and I don’t know why,” he revealed. “I made that mistake while I was training here and at the Europeans as well. It was such a difficult period in my life to go through. In something I’ve been so confident my life, to go so poorly so quickly has really taken its toll.

“I thought about quitting several times because there's only so many times you can fail and get back up again. My friends, family and coach have kept me in one piece and I feel like this medal is as much for them as me. I feel like I’m back.”

Heatly’s Edinburgh club-mate Yona Knight-Wisdom, competing for Jamaica, was left in tears after missing out on the final in 15th. “I’m still proud to be a two-time Olympian,” he said. “The last 18 months have been so hard, but moving to Edinburgh was the best decision and I’ll be back looking for medals at the Commonwealths.”