Kristaps Porzingis usually is on the court getting open looks because of the attention Carmelo Anthony demands or because Anthony passes him the ball. But the last two games, Porzingis has gotten much more out of it from watching Anthony.

Porzingis was unable to finish Monday’s double-overtime win over the 76ers because of a foot injury and he fouled out of Wednesday’s overtime victory against the Jazz. In both games, Anthony wouldn’t let the Knicks lose.

Anthony hit big shots, set up his teammates and made defensive plays as he continues to show a complete game this season.

“Melo is setting a great example for us,” Porzingis said. “How strong mentally you’ve got to be in those situations to find that energy to push through those overtimes and get those wins. How important it is to stay strong mentally to be able to win those games. I think a big part of why we’re able to win is because of him.”

Anthony has had better statistical seasons, but he is having one of his best all-around years. He’s averaging 21.7 points, 7.6 rebounds and a career-high 4.0 assists.

His expanded game has helped the Knicks to a 22-22 record. They host the Clippers Friday night with a chance to go above .500 for the first time since they were 8-7 on Nov. 23. The Knicks are 22-18 with Anthony in the lineup.

“I just try to take what the game is giving me,” Anthony said. “Whatever that calls for me to go out there and do certain things on the basketball court depending on that night, that’s what I’m going to do.”

In the win over Utah, Anthony scored 10 points and had five assists in the last 12:10 of the game, and played good defense on Gordon Hayward, who scored relatively easily for the first three quarters.

Before the game, Derek Fisher said he could see Anthony becoming more of a playmaker within the triangle offense. Anthony then went out and matched his season high with nine assists. He also passed Larry Bird and moved into 31st place on the NBA’s all-time scoring list with 21,793 points and needs only 21 to jump ahead of Gary Payton.

Anthony is climbing those charts, but Fisher believes he’s also on the rise as a player overall

“The interesting thing for Melo is there’s this land of opportunity out there that he has not quite accessed yet,” the coach said. “That’s what we’re here to do alongside of him. In terms of where I rank him, I don’t know. I’m hopeful that the product is so unfinished that we’ll end up ranking him pretty high among those guys.

“He’s a prolific scorer, no doubt about it, but I think the other facets of the game that he’s capable of dominating in as well, those are the parts that will elevate him and elevate our team, and that’s what we’re trying to do.”

Anthony hit the overtime-forcing three-pointer in Monday’s win, and logged a season-high 49 minutes on a sore ankle. He shot the ball well against Utah, hitting 13-for-20 overall and 4-for-5 in the fourth quarter and overtime.

But Anthony didn’t force the issue, continuing to find the open man. Late in regulation, Anthony fed Arron Afflalo and Langston Galloway for three-pointers, as Porzingis watched and learned.

“He’s doing it all,” Porzingis said. “He’s not only scoring. In other areas he’s at the top of his game.”