Lucas Hedges, the star of the upcoming “ex-gay” drama Boy Erased, has opened up about his sexuality.

Speaking with Vulture, Hedges, 21, said that he could relate to his character in Boy Erased.

“It's a story about shame, which felt to me like the governing factor of my life and my childhood,” Hedges said.

Based on Garrard Conley's 2016 book Boy Erased: A Memoir of Identity, Faith and Family, Boy Erased stars Hedges as Jared, a college student who is sent to an “ex-gay” camp after he is outed to his conservative parents, played in the film by Nicole Kidman and Russell Crow. The film opens on November 2.

(Related: Garrard Conley: You don't have to be in conversion therapy to be in conversion therapy.)

Hedges recalled telling his mother about a crush he had on a boy in the third grade while attending day camp.

“I felt terrible about it,” he said. “I remember her being very comforting, and she understood that something was distressing me, and she said, 'You don't have to go back to camp today.'”

Hedges described his sexuality as fluid.

“In the early stages of my life, some of the people I was most infatuated with were my closest male friends,” he said. “That was the case through high school, and I think I was always aware that while for the most part I was attracted to women, I existed on a spectrum.”

“I felt ashamed that I wasn't 100 percent, because it was clear that one side of sexuality presents issues, and the other doesn't as much. I recognize myself as existing on that spectrum: Not totally straight, but also not gay and not necessarily bisexual,” Hedges said.