New York Knicks’ Willy Hernangomez (14) and Ron Baker (31) defend against Miami Heat’s Goran Dragic (7) as he drives to the basket during the first half of an NBA basketball game, Friday, March 31, 2017, in Miami. (AP Photo/Joel Auerbach)

MIAMI — With New York missing Carmelo Anthony and Derrick Rose due to injuries, Friday’s game against the Knicks seemed like one of Miami’s easiest in a stretch of games that will decide the Heat’s playoff fate.

But things aren’t always what they seem.

The Knicks’ shorthanded roster handed the Heat a 98-94 loss Friday night at AmericanAirlines Arena. The loss was especially painful, considering New York (29-47) is the only remaining opponent on the Heat’s schedule that’s been eliminated from playoff contention.

Despite the loss, the Heat remained in the Eastern Conference’s seventh playoff spot because the Pacers also lost Friday.

“It feels like everything we worked for has just disappeared, but it hasn’t,” Heat point guard Goran Dragic said. “It’s a new day tomorrow. Of course, we would have liked to win this game. But unfortunately we didn’t and that’s why we need to come in tomorrow with clear heads and start working and try to get better. We’re still in the playoffs, but every game counts.”

New York led for most of the contest, but Miami (37-39) still had a chance to steal the game. The Heat had the ball trailing by two points with 12.1 seconds to play, but the possession ended when center Hassan Whiteside was called for offensive goaltending as he went to tip-in Dragic’s shot that bounced around the rim.

But that possession isn’t what cost the Heat the game. Miami’s defense struggled to stop the Knicks all night, as New York made 47.5 percent of its shots.

The Heat were led by Dragic, who finished with 22 points and five assists. Whiteside contributed 17 points and 16 rebounds.

Miami now moves on to host Denver on Sunday. The Heat have six regular-season games remaining, with four of them coming against the East’s top four teams.

“I know the guys feel heavy minds about this right now,” coach Erik Spoelstra said of his players. “But we knew for the last month that [getting in the playoffs] would be one of the most difficult things we have to do. This is a great opportunity still just to embrace these games. This is great competition.”

Here are our five takeaways …

Good offense isn’t enough for Heat: The Heat made 60 percent of their shots and scored 29 points in the first quarter. But it didn’t matter because New York topped that with 33 points on 50 percent shooting in the opening period. That trend continued, as the Heat finished the first half trailing by four points despite scoring 55 points on 48.8 percent shooting over the first two quarters. Bad defense hurt Miami all night, as New York made 47.5 percent of its shots. This Heat team needs their defense to win games.

“We just were never able to get to our identity and impose our will defensively,” Spoelstra said. “There were pockets of mental lapses that would lead to easy baskets, and some of those would lead to deflating type baskets.”

Unreliable 3-point shooting hurting Heat: One of the driving forces behind the Heat’s incredible turnaround has been elite 3-point shooting. But Miami’s shooting has been a little off lately. The Heat made eight of their 33 shots from 3-point range Friday. When you shoot that many threes, it’s hard to win when you’re not making a good amount of them. Miami is now 2-3 in its last five games. In those three losses, the Heat have shot a combined 24.7 percent on 3-pointers.

“We had one of those nights where the 3 wasn’t going down,” Spoelstra said. “But that hasn’t been what we’ve talked about that we absolutely need to do. We’ve talked about that we need to defend, move the ball, get to our game whether or not we’re making 3s or not. So the 3-ball didn’t go in tonight and we didn’t defend, and it didn’t end up being a good formula for us.”

Wanted — Dion Waiters: The Heat won’t use it as an excuse, but they really miss Dion Waiters. Miami is now 3-4 since Dion Waiters went out with a sprained left ankle. Josh Richardson, Waiters’ replacement at starting shooting guard, struggled Friday with two points on 0-of-4 shooting. The Heat don’t know when they will get Waiters back. There’s still no timetable for his return, but Spoelstra did say Friday morning that Waiters continues to progress and the swelling in his sprained ankle continues to subside. But Waiters, who was injured March 17 against Minnesota, has not started any on-court work yet. Miami’s hope is that Waiters is able to return before the end of the regular season.

The Okaro White minutes: There have been more of them lately. Rookie Okaro White had received a DNP-coach’s decision in four of the 10 games leading up to Wednesday’s game in New York. But Spoelstra has used White off the bench in Miami’s past two games. White payed 20 minutes and provided energy and some solid defense to go with seven points and five rebounds Wednesday in New York. That performance was good enough for Spoelstra to use White again Friday against the Knicks in Miami. This time, the forward finished with two points and two rebounds in five minutes. There’s a role for White on this team moving forward, as Spoelstra feels comfortable using him as a “short-minute guy” and likes the way he can defend multiple positions. Don’t be surprised to see White on the court in more games down the stretch this season.

Missed opportunity: The Heat didn’t fall in the Eastern Conference standings, but they wasted a big opportunity. With the Pacers also losing Friday night, the Heat stayed in the Eastern Conference’s seventh playoff spot. But if the Heat would have defeated the Knicks, they would have moved one game ahead of the No. 8 Pacers and 1.5 games ahead of the No. 9 Bulls. Instead, the only thing that separates Miami and Indiana is the head-to-head tiebreaker. The Heat and Pacers have the same record. And now idle Chicago is just one-half game behind Miami.