The actor also explains why Maggie Gyllenhaal is "fearless" with filming sex scenes.

James Franco is opening up about his troubled youth.

The actor, 39, is featured on the September cover of OUT magazine, in which he gave a wide-ranging interview covering everything from his early struggles with depression to his latest directional challenge: sex scenes.

“I have a very addictive personality,” Franco admitted. “I have a very addictive personality. When I was a teenager I got over certain addictions, and that’s when I started acting, at age 17.”

The actor has spoken before about getting in trouble as a teenager for drinking, graffiti and even selling stolen bottles of perfume and cologne, for which he was eventually arrested. The experience made him realize he needed a change, so Franco took up acting.

Credit: Gavin Bond

But before long, acting itself became like an addiction. “I really threw myself into it, and that became everything, to the point where I didn’t even socialize,” he explained. “And then after, like, 10 years of that, at age 27, I realized, ‘Man, I’m so depressed. On the surface my life seems pretty good—I have a career and everything— but I feel isolated and lonely.'”

FROM PEN: This Is Us’ Chrissy Metz on Finding Happiness After Years of Dieting and Depression

Now, Franco has a new passion: directing. “I’ve got to say, of all the things that I’ve done, and I’ve done a lot, the actual process of directing is the most fun, because you’re in the middle of all these different creative people,” he said.

Credit: Gavin Bond

Franco directed two episodes of his new HBO series The Deuce, in which he stars as twin brothers trying to make it big in the emerging porn industry of ’70s New York City. Working behind the camera on the series, Franco found himself in the awkward position of directing a sex scene with Maggie Gyllenhaal.

I had to direct sex scenes in The Deuce and … whooo, it was interesting, I have to say. Maggie Gyllenhaal, in addition to being just an incredible actress, is fearless, and she really led the charge with how she handled the sex scenes and how she handled herself, and really set the template for everyone else,” he explained. “If I didn’t have someone like her, I think it would have been really, really hard to engage in those scenes, but she just made it so easy. She’s fearless.”