PORT ST. LUCIE — The physical breakthrough came in a high-school batting cage in Arizona in mid-December, when the Mets’ new batting coach Kevin Long found a key to unlock the power in Brandon Nimmo’s swing.

The mental breakthrough occurred over this past year when the young outfielder decided it was time to stop trying to please everyone and center on his approach to the game.

At the tender age of 21, going on 22, the former No. 1 pick (13th overall in 2011) has never been more positive his career is going in the right direction. It is only a matter of time before Nimmo lands at Citi Field.

Nimmo already is reaping the rewards of the Mets hiring Long and assistant hitting coach Pat Roessler, who were let go by the Yankees.

Nimmo stroked line drive after line drive Wednesday during batting practice at the Mets’ spring training complex, which essentially has become the Wyoming-born and -raised Nimmo’s home this winter following his time in the Arizona Fall League.

A Mets official was walking by the batting cages at 7 a.m. the other day and there was Nimmo, getting some work in on the tee on his new-found swing.

Nimmo laughed when told that story and proceeded to talk of why he is so excited about his swing and his future.

“I’m very sorry for Kevin that he got fired and everything, but I’m very glad for us,’’ Nimmo said with a first-to-third smile.

What Nimmo learned from Long is this: It’s all in the setup.

Nimmo sets up a little lower to the ground now and “I’m driving that back leg into the ground.

“We noticed that my hips weren’t really getting turned at 90 to 100 percent at contact, they were more like 70 percent, I was closing myself off,” Nimmo said. “So we just straightened that out.

“You could see the change right away, a lot more power was showing up and that’s exciting for me. I try to hold my finish a little bit so I can see where my foot is and that’s what I’ve been working on here.

“I felt that last year was a good year and I think there is a lot more potential there.’’

Tim Teufel, the Mets’ third base/infield coach, said he has been impressed. He stopped by Wednesday’s pre-camp workout and, after watching Nimmo hit, said: “He’s got a plan at the plate, which I really like.

“He’s consistent in his setup and he’s thinking about what he’s doing in there, he’s not just going in there hacking. From last year to this year, he’s really grown up. His body is filling out. I like what I see, he’s an up-and-comer.’’

In 2014, Nimmo made it to Double-A Binghamton after starting the season at Class-A St. Lucie. He batted a combined .278 with a .394 on base percentage and 10 home runs.

With his body type, the 6-foot-3, 205-pounder does get some Hunter Pence comparisons.

“I’m OK with that,’’ Nimmo said with a big smile. “The guy might be funky, but he gets the job done and he’s on winning teams.’’

Nimmo has worked extensively in the Barwis workout camp here and loves it, adding to the chorus of players who believe in Barwis.

“My core is the strongest it’s ever been,’’ Nimmo said. “The first day, I thought the warm-up was the workout.’’

As for the other change, Nimmo explained, “I used to be a real big people-pleasing guy, but you can’t please everyone, that’s just the way it is.

“Challenges have come up that make you question whether you love this game or not.”

Nimmo loves it.

“Failure is hard to overcome,’’ he said. “At the end of the day you have to be OK with yourself and the work that you put in. I just make sure I put all the preparation I can into this and once the games come, the results will show.’’

Yes, in more ways than one, Brandon Nimmo is on his way to success.