When the coronavirus pandemic hit the United States, Jamie Dornan was in New York, about to shoot a new TV series.

But as production shut down on “Dr. Death,” the 37-year-old actor flew back to his home in England, where he’s been in self-isolation with his wife and three children.

Dornan, the star of the “Fifty Shades” franchise, recently joined Instagram, posting a funny video with his face covered in blue paint for an upcoming role — a leap for a normally private person. This week, he’s been getting ready for the release of his latest film, “Endings, Beginnings,” a drama directed by Drake Doremus, which debuted at last fall’s Toronto Film Festival.

In the movie, Dorman plays an Irish writer smitten by a woman (Shailene Woodley) that both he and his best friend (Sebastian Stan) meet at a party. “Endings, Beginnings” is now available in homes on digital.

Since starring as Christian Grey in “Fifty Shades of Grey,” Dornan has zig-zagged as an actor, choosing character parts in independent movies such as “Anthropoid” and “A Private War.” And he’s psyched about his first major comedic turn in “Barb and Star Go to Vista Del Mar,” a comedy written by and starring Kristen Wiig and Annie Mumolo.

Dornan spoke to Variety about “Endings, Beginnings,” which was largely improvised, and why he wasn’t typecast after “Fifty Shades.”

How did Drake Doremus first approach you for “Endings, Beginnings?”

I love Drake’s work. We were at the same agency so his name popped out a few times. And then we ended up doing an advert together. I did this Hugo Boss campaign, like a perfume campaign, and Drake directed it. We went to Azerbaijan four days before Christmas a few years ago, and we just hit it off. We were very much aligned in our thinking and approach to art, but also to golf. He’s a big golf fan.

And we were like, “it’s great to do this commercial and everyone’s getting paid and it’s a beautiful piece of work, but it’d be great to do a real movie together.” We played golf when I was in L.A. and became friends. He was always saying he had this project that he had in mind for me.

Did you always know you were going to be the nice guy?

Drake kind of offered it up. There was a darkness to Frank [Sebastian Stan’s character], slightly. As you know, a lot of it is improvised. But even on the page, it felt like Jack [his character] was probably the better guy, slightly better morally. I’ve played a lot of bad characters and a lot of evil people, but for whatever reason, I was just drawn to the honesty and goodness that I saw in Jack.

Can you talk a little about Drake’s process of improvisation? He has an outline, and then the actors fill in the dialogue on the day of shooting. How did you prepare for that?

I genuinely wanted to run for the hills the first night. There was a night shoot in L.A., and I was like, “I’m so scared.” I was actually thinking of running away, like legitimately running away. I was terrified, because you’re so out of your comfort zone. The first scene I had was the first time Daphne [Shailene Woodley] and Jack meet. It’s a party scene. There’s a lot of extras there. There’s music so you have to raise your levels, talk loudly. I just felt so exposed, and I was like, “F—!” I sort of had no idea what was going to happen.

And there is a skeleton script. I feel like the first take, whatever is in the script came out of my mouth. You do one thing, and Drake comes over and goes: “Hey, forget everything on the page. Do whatever you want here.” And you’re even more terrified than you were the first time. But then, that gives way to … I don’t know, truth. You’re suddenly standing there just trying to tell the truth of these two characters and these two situations.

We’d sort of get into it. It’s mad, it’s amazing, it’s unique and none of us had worked like that before. I’d done a tiny bit of improv in a funny way, but this wasn’t meant to be funny. So yeah, it was crazy, but it was beautiful.

Are you drawing from your personal life in the improv?

I think by fairly early on in the process, you start to get a good idea of who it is that you’re embodying. And listen, I’m not going to be the first person to say when you’re improving — do you bring a large element of yourself into it? That’s a natural thing. You can’t help but let a little bit of yourself leak into it, especially if you’re doing something different in every take. I don’t think that’s a bad thing.

After “Fifty Shades of Grey,” you had so much international success at the box office. What is your philosophy to choosing roles?

I feel like you don’t have a f—ing clue what’s right until you read it and you’re like, “Oh, this is it. This is what I want to do next.” I think I have a stronger sense of what’s not right for me. And one thing with this job is to challenge myself and one thing is to keep a very large element of variety. I just wouldn’t — and I’m not trying to discredit anyone who’s in this world — but I just couldn’t be an actor who does action film after action film or, indeed, who does comedy after comedy.

I mean, that might be slightly more bearable, but my whole thing of being an actor is that we get to embody all these different worlds, and that’s what excites me. I’m not closed off to being in an action movie. I just don’t want to do four a year. If one comes along and speaks to me, then — yes, sure. And I think I’ve been lucky in everything post-“Fifty Shades.” There’s a lot in the market of the $5 to $15 million budget movie. And I personally believe that’s where the best scripts are. I’ve done things like “Anthropoid” or “A Private War,” and some of these movies, I’m really proud of. I’m just lucky they came my way because of the box office success of “Fifty Shades.”

Did you worry about being typecast after “Fifty Shades”?

No, because it was so unique. It can’t be typecast. There aren’t a million scripts lying around about millionaires who are into BDSM. It always felt like it was this sort of one-all situation. I’ve never done anything close to since and probably never will again, because it’s kind of its own thing. It’s like we did it; it lived in its own world and it was a very big world and a lot of people cared about it. But it’s kind of like, “That was it.”

Your next movie is the comedy “Barb and Star” starring Kristen Wiig.

I’m so excited for people to see the movie. I’m so excited to see the movie myself. Years ago, when I first started in the industry, I kind of only really wanted to do comedy and I was sort of making good comedy connections, feeling like I was going to go down that path. And then I did “The Fall,” and if you’re playing a serial killer, nobody’s considering you for comedy.

I guess it’s taken me a while to find my way back to that world. I’ve made enough people giggle along the way. It came about through the directors and producers having seen the chat stuff that I’d done like Graham Norton, where I’ve told loosely funny stories on a sofa during the job.

I mean, for my first comedy to be [with Wiig and Annie Mumolo], it’s kind of mind-blowing. We just had such a laugh making that movie in Mexico last summer. It’s a trip, though. I really hope people respond to it. It’s right up my street. They’re some of the funniest days I’ve ever had in my life.

You recently returned to Instagram. Can you explain to me what the video that you posted was, with your face covered in blue paint?

It was for a job. It wasn’t in the present. It’s something that I had done in the past that I haven’t even shot yet, to be honest. But it was like an excruciating, dreadful experience. The people who were doing it were lovely, but that whole f—ing thing over your face lasts for 40 minutes, where you’re breathing through the tiniest little holes in your nostril.

And I had a f—ing panic attack, and I’m not a panicky person at all. But I had a minute in between all that where I was like, “Uhh, guys! Guys!…” I couldn’t even say that. You weren’t allowed to speak, so I was doing it all through hand signals.

I could hear people go, “Are you ok?” And I was doing signs with my hand across my neck. And they’re like, “It’s ok. It’s only 15 more minutes.” I was like, “15 minutes!” That’s the longest f—ing number in my life. It was crazy for what it was. And I guess, just all this time I have in self-isolation, I was like, “F—, I’m going to join Instagram.” Half of the day I regret that I did it, and half of the day I think it’s kind of fun.

How have you been dealing with being in self-isolation?

Listen, I think there’s nobody in the world who isn’t affected, some greater than others. It’s a time for hope and there will be an end to this and we all will be able to be together again. I’m a pretty positive person, but I’m acutely aware of the heartbreak, what so many people are going through in losing loved ones and not even being able to say goodbye to them.

I think, “Just get through today.” You need a schedule. You need a plan. It’s harder if you’re by yourself, but I’ve got three young kids and my wife. We’ve got a proper schedule and we’re sticking to that because I think without that, we’d go mad. If you have a schedule, some sort of focus to get through the day, that definitely helps.