David Yates has worked his magic, so to speak, as the director of the final four “Harry Potter” films, and come November, the new installment in that franchise, “Fantastic Beasts and Where to Find Them.”

In between his time spent with wizards, he’s set his attention on a classic literary and cinematic character, Tarzan, who he calls “the first great superhero.”

“He kind of kicked off, arguably, the whole superhero thing, he was the first,” Yates says. “I think that resonates, but I also think there’s something very profound about a human who has a connection to the animal kingdom and our ancestors, where we began. There’s something really compelling about that.”

“The Legend of Tarzan,” which swings into theaters on June 30, stars Alexander Skarsgård as John Clayton, aka Tarzan, who is living in England with his wife, Jane (Margot Robbie). They’re brought back to Africa, where they face some dangerous situations from both humans and animals.

amNewYork spoke with Yates about the film.

What was your relationship with Tarzan before starting the movie?

With the old movies I saw them when I was growing up as a kid in the North of England. They would run them on the television around Christmastime and every single morning there would be a “Tarzan” movie. And I always found them very charming, but even at that early age, I recognized that they probably didn’t have that much money to put those films together so they were always a bit hokey. Every time they cut to the elephant stampede, it would be the same elephants that were running in every single film.

So what drew you to doing this movie?

I got sent this script written by Adam Cozad and Craig Brewer and those old movies resonated in my head. And I thought, “I’m not sure, I think I know this,” and then I opened the first page and started to read and I was kind of blown away, really, and what that script did was it reminded me of the quintessential elements, the landscapes, the sense of adventure, this extraordinary character and the tribes, the romance. There are so many things that would make this experience much richer and more kinetic and more exciting than I was used to from the movies I saw as a kid. And with Warner Bros., there was this opportunity suddenly to bring this character onto a much bigger, more kinetic, more epic stage and to really deliver on all those elements that have been underserved in the past. And so that’s what we did.

How does modern technology make this film more viable?

The great thing about CGI now is you can explore animals — it’s impossible to direct animals, as you know. And it’s also not appropriate now to try. And it also infringes on completely the values that lie within the film, to try and coerce or control animals to give you a performance. So CGI allows you to do things, to bring the world alive that wasn’t possible a few years ago, which is pretty exciting. And which is one of the reasons this story really hasn’t been told in a way we’re able to tell it now. The other thing we’re able to do with modern visual effects is take environments that were shot in Gabon — we had this really wonderful complex camera system ... it’s a very hi-res 6K camera strapped together to helicopters, flying down rivers and through rainforests in Gabon — we were able to take those environments and stitch them, build them around our real-world environment in England where we did our primary shooting. Again, very 21st-century movie-making technology. We’re able to combine those to create an almost flawless sense of being in the rainforest or going down the river. And it would have been almost impossible to do that a few years ago.

What makes Tarzan so timeless?

I think it’s the connection with the natural world. ... His ability to thrive in a fairly dangerous environment, his skill set, his strength, his agility, his ability to communicate with the animals. [And] I think when you look at those really old “Tarzan” movies, the silent movies, there’s always been an element of sex, ultimately, for lack of a better word. There’s something sexual and sexy about Tarzan in a way that we sort of lost. It’s this primal, wild thing that resonates around the character — a human being unleashed using his primary qualities, and of course, you throw Jane into the mix, so there is something kind of sexy about it all that sort of got lost in the B-movie mix and all that, that is all there under the surface somehow.

What made Alexander right to play Tarzan?

It sounds really daft, but I really loved his shape. He’s got great length and verticality. He’s got really long arms and really long legs and so it gets you as far away as you can possibly get from that sort of He-Man kind of shape, the primitive, wide neck, square shape. I felt if someone is going to swing through the jungle, they’re going to need very long, dexterous arms. If you look at an orangutan, for example, how it uses its arms to move through the jungle, Alex has beautiful arms, beautiful legs. So physically, if you’re reintroducing this character to a modern audience, the length and shape of him was so important. So for me he’s a modern Tarzan. ... Secondly, I was a huge fan of his acting in some of the smaller, more delicate movies he made — “Melancholia,” for example, a lovely sort of European film with Kirsten Dunst, a Lars von Trier film. Really beautiful, delicate performance in that. A television series he did called “Generation Kill” — he was bringing a lot of depth to those roles. And then I also saw some of “True Blood” — he was clearly being Scandinavian, not at all shy about taking his clothes off. And that was an asset.

Between “Tarzan” and “Fantastic Beasts,” how on earth do you have time to do two movies of that caliber so close to each other?

I don’t take any time off and I love what I do. It’s not like work for me, and I work 24/7. I enjoy it very, very much. A lovely actor I’m working with at the moment, we’d had a really long day doing some scenes together and I said at the end, “Look Ezra [Miller], you’re going to need a holiday after this,” and he looked at me and he smiled, and he said, “David, every day is a holiday.” And to me that resonated because when I go to work, it’s like being on holiday. I’m very privileged and lucky to be making movies, telling stories with some very talented, lovely people, and it never feels like work. And so I enjoy it, and that’s partly the key of how I can balance two movies.