NEW YORK (AP) — Cooper Hoffman had never wanted to act. In elementary school, he joined in the plays but only helped out backstage. When it was time for cast and crew to take a bow, he remembers staying as far out of view as he could, or hiding in the bathroom.

But the very first time that Hoffman, son of the late Philip Seymour Hoffman, read in a casual, let’s-just-see, not-really-official audition for “Licorice Pizza” with writer-director Paul Thomas Anderson and his eventual co-star Alana Haim, something clicked.

“I don’t think I ever really considered it a possibility. I was always kind of scared to enter that arena because my dad did it so well,” Hoffman says. “But the second I read with Paul and Alana, I kind of got so emotional. I was like, ‘Oh my god, I need to do this.’”

By the time Hoffman, 18, was filming “Licorice Pizza,” he was struck by how comfortable it felt, even though it was his first film. Here he was doing the thing he had long avoided, and loving it. A decade after Hoffman’s father had been a fixture in Anderson’s films (“The Master,” “Magnolia,” “Boogie Nights,” “Hard Eight”), his oldest son was taking his place on another Anderson set. Fittingly, one of Alana’s first lines to Hoffman, who plays the young actor-slash-hustling entrepreneur Gary Valentine, is: “You are SUCH an actor.”

“In a weird way, it felt almost like I was stepping into my dad’s shoes,” Hoffman said in a recent interview. “It really was this feeling of: Maybe this is what he felt like. It was this weird out-of-body experience. I felt incredibly close to my dad through the whole shooting process.”

“Licorice Pizza,” which expands to 2,000 theaters this weekend after being nominated for three Academy Awards including best picture, is set in the 1970s and in Anderson’s native San Fernando Valley, just over the mountains from Hollywood. Its cast is peopled by friends and family. The Haim sisters, who all appear in the film, had long been pals of the Andersons. Maya Rudolph, Anderson’s wife, and their children are in it, as are Sean Penn, Bradley Cooper, Tom Waits and George DiCaprio, father of Leo.

But in the movie’s mishmash of family and celebrity, Hoffman’s poignant presence is something else. He gives Anderson’s sunny and shaggy film its breezy sincerity. More often than not, he's smiling or running, like a kid at play. He comes across as verifiably his own man, and on the move. But there are also connections that are hard to shake. In Anderson’s “Punch Drunk Love,” Philip Seymour Hoffman played a mattress salesman. In “Licorice Pizza,” Cooper hawks waterbeds.

“It is one of the cinematic threads tied together which no one ever could have foreseen or predicted,” says Anderson, chuckling. “Yet here we are! Look at the way the dice rolled on this. You shake them and roll them down the felt and you go, ‘Would you look at that?’”

Just as Hoffman didn’t set out to act in “Licorice Pizza,” Anderson didn’t initially try to cast him. But after auditioning others that lacked the desired authenticity, Anderson turned to Hoffman, whom he had known since toddlerhood. He had directed him before, too — in iPhone home movies that Anderson would shoot with his son Jack that he describes as “generally ‘Mission: Impossible’-based situations.” Cooper played the villain.

“He takes it just as serious,” says Hoffman of Anderson’s home movies. “I would start laughing and he’d be like, ‘Cooper, you got to get the scene down.’ In some ways, it prepped me on a very low scale for ‘Licorice Pizza.’”

But nothing could prepare Hoffman for the first day of filming. Because of Bradley Cooper’s tight schedule, they began with the much-talked-about encounter with Jon Peters (Cooper). In his first-ever scene, Hoffman came face to face with one of Hollywood’s biggest stars, in an over-the-top exchange where Cooper gets aggressively in Hoffman’s face.

“I don’t think I ever felt more nervous in my entire life,” says Hoffman. “The first take I was shaking. Paul didn’t use it, obviously, because I was stuttering my words. It was great to have Alana there. Afterward we were like, ‘What the hell did we get ourselves into?’”

But Hoffman quickly realized how much he loved the communal thrall of moviemaking. He didn’t yet have his driver’s license, so Haim (also a first-time actor) often drove him to set or to get In-N-Out for lunch. Hoffman was 11 when his father died in 2014, so his fondness for Anderson's films mostly came afterward. He counts movies like “Boogie Nights” and “The Master” among his favorites. He loves the Mattress Man.

“I see my dad but he’s playing a character. Whenever I see Paul, that’s when it comes to me,” says Hoffman. “Of course, it’s an emotional thing to watch someone that’s gone in a movie. I love watching my dad. I think he’s a brilliant actor. I know I’m biased but I do genuinely think that’s true.”

Hoffman, whose mother is the costume designer Mimi O’Donnell, has two younger sisters. Before “Licorice Pizza,” he had largely avoided public life. “I think attention scares me a little bit,” he says. Some will remember the charming photographs of Cooper and his dad courtside at a Knicks game. (Hoffman is still a fan.) His mop of red hair, has prompted some, he says, to compare his looks to his dad’s “Boogie Nights” character, Scotty.

“I don’t know whether to take that as a compliment or not,” says Hoffman.

But to Anderson, Hoffman takes at least as much after his mother. “He has her eyes and her smile,” he says. And from a young age, Hoffman has always simply been himself.

“It’s still the same empathetic, open-hearted, tender, hilarious kid that I knew when he was 2 years old,” says Anderson. “He’s more or less exactly the same. His greatest trait is his empathy.”

That’s made Anderson especially protective of Hoffman, who was giving his first extensive, solo interview. Not all realms of show business are as nurturing as Anderson’s familial film set. The director compares watching Hoffman step forward to seeing your kid bike around a blind corner for the first time.

But Hoffman, nominated for a Golden Globe and awarded best breakthrough performance by the National Board of Review, is getting to work. Inspired by his experience on “Licorice Pizza,” he's currently attending acting school in New York.

“Right now, for the time being, I very much want to be an actor. And I’m doing it,” says Hoffman. “I’m happy to take this road and see what happens with it. And I’m thoroughly, thoroughly enjoying it. It’s a beautiful thing to be compared to my father. But I also do hope, the fact that I’m an actor, that people don’t just look at me as his kid. I hope people can differentiate us.”

Finding his own way as an actor has helped Hoffman grasp something about his past, and his father. To illustrate it, Hoffman relates a story his mother told him about his grandfather consoling his dad after a breakup.

"His dad said something kind of beautiful: ‘The relationship hasn’t ended. You might not see her, you might not be with her constantly. But you’re thinking about her. The relationship lives on,’” says Hoffman.

Given the Oscar nominations for “Licorice Pizza,” Hoffman could be attending the Oscars next month. It wouldn't be his first time. In 2013, his dad took him when he was nominated for “The Master.” Hoffman remembers the night vividly. How his dad wasn't sad when he lost. What the afterparty was like.

“He was taking care of me and checking up on me. At some point in the night, I said, ‘I don’t like this. I want to go. This is overwhelming. There are too many people,’” says Hoffman. “We just went back to the hotel and played Wii and ate cheeseburgers and Joaquin Phoenix came over and we hung out with him. And that’s all I really wanted to do.”

___

Follow AP Film Writer Jake Coyle on Twitter at: http://twitter.com/jakecoyleAP

Copyright 2022 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.