Ben Affleck's immersing himself in a new role that ya might say came along at the perfect time -- because he's playing an athlete-turned-addict who's trying to make a comeback. Cameras were rolling in L.A. Monday as Ben filmed a scene for his new film, "Torrance," in which he stars as a former All-Star basketball player who's battling addiction while taking a high school coaching gig at his alma mater. You can see he's pretty beefed up for the part, which explains those recent shots of him hitting the gym and showing off an impressive set of guns. Ben completed a 40-day rehab stint for alcohol earlier this month, and is currently in outpatient care dealing with his real-life addiction issues. We broke the story ... his ex, Jennifer Garner, took him to rehab after she staged an intervention. You gotta think his experience in rehab will have some impact on this performance.