A man has been shot in the head with a handmade gun in the central west of New South Wales.

Police say the man was shot in the head with a potato gun in an apparent camping accident at the Gurnang State Forest, south of Oberon.

The air-pressurised cannon is designed to shoot potatoes and other projectiles.

The 24-year-old man was taken to Oberon Hospital before being flown to Westmead Hospital in a critical condition.

Police say a crime scene has been established and an investigation has begun.