Can two people share an umbrella during a rainstorm in a rom-com and NOT fall in love? (F Word Productions)

Daniel Radcliffe isn’t a wizard, but he can do anything he wants to. He can also not do anything he doesn’t want to. A lame rom-com full of irresponsible characters is something he didn’t want to do.

“I wanted to make a film where people fall in love and just don’t go off hurting people and having affairs all over the place without any consequences,” the actor says.

Radcliffe wanted to be in “What If.” In it, Boy meets Girl. There’s a spark. Girl already has a boyfriend. Girl and Boy are adults who make a series of mature decisions in order to protect their emotional health and the feelings of those around them. The end. There: That’s the plot (minus the ending).

Boy is Wallace (Radcliffe) and Girl is Chantry (Zoe Kazan), and they meet at a party. In another movie, the force of their attraction would lead to cheating or a breakup. Instead, the two become close friends; even though Wallace is falling for Chantry, he keeps his mouth shut about it.

“He’s desperately trying to be a good person and not screw anyone over, whilst still falling in love,” Radcliffe says.

Some of the obstacles to romance in “What If” are external, most notably Chantry’s longtime boyfriend, Ben (Rafe Spall) — far from the typical rom-com “wrong guy.”

“There’s nothing [in her relationship] that she can point to that’s gone awry,” Radcliffe says, “but she meets [Wallace] and has that connection.”

Still, she chooses to keep her romantic sights focused on Ben, and Wallace, good guy that he is, keeps a respectful distance.

The arrangement isn’t as simple as it sounds. “In a lot of movies the complexities of life are swept under the rug,” Radcliffe says. “In this film we used those real complexities to show that both of our characters are in this moral gray area all the time.”

Radcliffe found a like-minded director in Michael Dowse (“Take Me Home Tonight”).

“I wanted to make a movie that wasn’t the standard rom-com where people act crazy and resort to insane shenanigans,” Dowse says. “I love the genre, and when you actually nail one you can make a perennial film. Unfortunately, a lot of them are neither funny nor romantic.”

Radcliffe got his wish: “What If” is both.

Want more film?

‘Life Itself’ is the story of Roger Ebert & dad & me

Five documentaries you should see before you see “Korengal”

“The Railway Man” doesn’t quite get the gray areas of PTSD

“The Fault in Our Stars” shows the blunt force of cancer