Emilio Estevez says he didn’t have to look far to connect with his character in “The Public,” the indie film he also wrote and directed.

He portrays Stuart Goodson, a recovering addict and librarian who gets caught in between the conflict between riot police and homeless populations looking for a place to stay. Estevez’s real-life brother Charlie Sheen has publicly battled cocaine addiction and has attended rehabilitation facilities on multiple occasions.

“Addiction runs deep in my family … Unfortunately I’ve had firsthand experience dealing with people who are in the throes of addiction,” Estevez told Variety at the Hamptons International Film Festival. “And so for me, it wasn’t something that I had to search for. That sort of behavior, that sort of insanity and hitting rock bottom, I’ve seen it happen.”

Estevez, known for hit ’80s films like “The Breakfast Club” and “The Outsiders,” also spoke about his research process for the movie. He said it was inspired by a Los Angeles Times article written by a former Salt Lake City librarian who retired because he felt libraries had become “de-facto homeless shelters.” Estevez had seen unsafe conditions firsthand at the Los Angeles Public Library when he was there to do research for his 2006 film “Bobby.” He says the article struck a chord with him because Estevez “knew exactly what he was talking about.”

Timing proved to be one of the only difficulties while shooting, Estevez said. The film was shot in 22 days, which made it difficult to accommodate the busy schedules of co-stars Alec Baldwin and Gabrielle Union. Still, Estevez only had positive things to say about the filming process.

“When you make independent films — and any independent film director will tell you this — you understand what the struggle is, and yet I think that I would probably choose the harder road always anyway,” Estevez said.