RAY TO GO! Raymond Felton goes up for a shot against Tyler Hansbrough during the Knicks’ 88-76 victory over the Pacers. Photo: Getty Images

When Raymond Felton heard Donnie Walsh had been in the building, he began to hurriedly change into his street clothes in hopes of catching the Knicks’ former general manager before he left the World’s Most Famous Arena.

“I didn’t know he was here,” Felton said. “I got to see my man before I leave.”

The Knicks had just dusted the Pacers 88-76 in a stellar defensive performance that compensated for an afternoon of poor shooting. Felton was just 5-of-15 from the field as the Knicks shot just 36.7 percent as a team. But they won by creating 19 turnovers and limiting the Pacers to just 39.4 percent shooting.

At 7-1, the Knicks rebounded nicely from their loss at Memphis on Friday night and continued to look like one of the NBA’s elite teams. Credit must be given to Walsh, whose trade on Feb. 22, 2011, to acquire Carmelo Anthony from Denver laid the groundwork for what the Knicks are now.

“I didn’t think there was one thing he couldn’t do,” Walsh said of Anthony yesterday. “Now he’s doing all of them.”

Felton was one of several Knicks shipped to Denver for Anthony. Walsh sent Felton, Danilo Gallinari, Wilson Chandler, Timofey Mozgov and a first-round draft pick to the Nuggets for Anthony and Chauncey Billups. The trade was the culmination of three years of digging the Knicks out from the salary-cap hell created during the Isiah Thomas era. There was plenty of bad basketball that had to be endured as Walsh dealt players for expiring contracts.

The master plan of signing LeBron James to a free-agent contract didn’t work, but the Knicks used the cap space to sign Amar’e Stoudemire and eventually acquire Anthony, who came at a high price.

“Either you want Carmelo or you say no,” Walsh said. “I just thought we’re never going to get another chance to get him.”

Walsh, 71, left after the 2010-11 season and is now president of basketball operations for the Pacers. But his imprint on the Knicks remains as long as Anthony, Stoudemire and even Felton are here. It tells you something that Felton wanted to search out Walsh and give him a hug and a handshake.

After struggling in Denver and Portland, Felton is reaping the benefits of the trade. It’s a rare situation where his sacrifice is now working to his benefit. Anthony’s 26 points and nine rebounds accounted for much of the Knicks’ offense on a day when points were hard to come by. Defensively, Anthony played just as hard, setting the tone for the entire team.

“He’s got himself in great shape and he’s with a group of guys that I think he believes in and so he’s doing it,” Walsh said. “I think he always tried to win the game and wants to win. But when you’re there and you don’t know if there are other guys there that can do it [offensively], then maybe you overextend on that end of it. Now, he’s doing everything because he’s got a good team.”

Walsh said he has no regrets about his tenure as the Knicks’ general manager. He shouldn’t. The Knicks were a franchise without leadership before he got here. The salary cap was a mess and there was little hope for change. Now the Knicks are 7-1 and looking like a team that could realistically contend for a championship.

“I’m really happy for the fans because during the years when we were breaking the team up, we went through two years that we were going to lose,” Walsh said. “So I’m glad that they can come in now and say, ‘Wow, this team could be really good,’ because I think they will be.”

Current GM Glen Grunwald signed Tyson Chandler and assembled this year’s roster. But Walsh deserves part of the credit for where the franchise is now. Felton just wanted to hug him and tell him so.