In the movie, the star plays a struggling alcoholic who has a chance at redemption.
Ben Affleck had a sober liaison drive him back and forth from set to rehab while making his latest flick, "The Way Back," according to a co-star.
Affleck completed a 40-day stint in a facility treating alcoholism in October 2018, which coincided with the filming of the movie, and production was well aware of the actor's situation.
"Everybody was very transparent from the beginning that he was in rehab at the beginning of the film," Affleck's co-star Will Ropp told People at the premiere in Los Angeles on Sunday.
Ben Affleck Reflects on Breaking Divorce to Kids, Talks Relationship with Jennifer Garner Now
View StoryRopp added, "He had to have a sober liaison that would bring him to set and that would bring him back from [the] set."
It is often common practice for a person working an outpatient recovery program to have a "sober escort" to help get them to "appointments with doctors, therapists, counselors, and support groups," according to Sunrise House.
Ben Affleck Reveals If He's on Dating Apps, Talks About Jennifer Garner and J.Lo In New Interviews
View StoryThe "Justice League" alum also spoke to People about the "The Way Back," which follows the story of a struggling alcoholic who has a chance at redemption while coaching his high school alma mater's basketball team.
"There are some things about this character I really could connect to -- being a recovering alcoholic, going through family strife, a divorce."
He added, "You try to bring your own life experience to the parts that you can use your imagination on the other parts."
In March of last year, Affleck opened up about about his struggle with the disease, telling Hoda Kotb on "Today" that it is a "lifelong struggle."
"Some people are really uncomfortable, it doesn't bother me to talk about alcoholism," Affleck said at the time. "Being an alcoholic, it's part of my life. It's something that I deal with. It doesn't have to sort of subsume my whole identity and be everything, but it is something that you know you have to work at."
"I had a problem and I really want to address it," he continued. "I take some pride in that...It is about yourself, your life, your family and people we encounter these kinds of hurdles and we have to deal with them."
Affleck had two other stints in rehab in 2001 and 2017.
"The Way Back" opens March 6.
Got a story or a tip for us? Email TooFab editors at tips@toofab.com.