The father of a Brooklyn high-school basketball player got so upset about his son’s lack of court time that he confronted the kid’s coach during a melee that resulted in both being shot by a third man, sources said.

The father, 47-year-old Christopher Hooks, went to the home of Paul Robeson HS coach Todd Myles Saturday night, according to police and league sources.

Hooks was angry over his son’s lack of playing time in a game a few days earlier and wanted to confront the 42-year-old coach, according to the sources.

The game took place on Tuesday, when Robeson lost to Westinghouse HS. Hooks’ wife was visibly enraged about her son’s lack of playing time, a league source said.

When Hooks went to argue with the coach at his home, a third man arrived on the scene and started shooting, police sources said. It’s not clear why.

Hooks was shot in the neck and Myles was grazed on his left leg. Hooks had to undergo surgery, the sources said.

The gunman had not been apprehended as of late Monday.

Fans were outraged by the violence.

“If this is what high-school sports has gotten to, it’s gonna scare a lot of people away from coaching,” a league source said.

“It’s sad that parents are losing their minds.”