James Roday spent the better part of a decade solving crimes and doing silly things on USA Network’s cult comedy, Psych. Now, two years after the beloved series bid farewell, he is taking an unexpected detour -- playing struggling, HIV-positive writer Dan Schauble, who takes on the healthcare system in the dark AIDS ensemble comedy, Pushing Dead.

“Honestly, this isn’t the kind of project that generally comes my way and that was part of [why I wanted to do it],” Roday, 40, told ETonline. “Why not roll the dice?”

Roday had every reason to be nervous. After a chat with writer-director Tom E. Brown, he still wasn’t a hundred percent certain he could land the job, citing his resume (see: eight seasons on Psych, Beerfest) as a primary factor.

“You do something like something like Psych for long enough, it’s tough to shake up people’s preconceptions of who you are as a performer,” Roday said. “They see you as that and in a way, how can you blame them? It’s almost like you have to cleanse their palette and I was impressed that Tom was able to look at Psych and somehow see me being this guy.”

Once everything lined up, it was “a no-brainer” for Roday.

“It’s a project with something to say and it’s a role that’s very different for me,” he explained. “If you’re not going to do those projects when you have the opportunity to do them, then it’s tough to get yourself back there.”

Loosely inspired by events from Brown’s own life, Pushing Dead -- which co-stars Danny Glover, Robin Weigert and Khandi Alexander -- kicks off when Dan is dropped from his health plan after accidentally depositing a $100 birthday check into his bank account, forcing him to go to Plan B (and C and D…) to come up with the $3,000 a month necessary to pay for his medicine.

“For a man who has every reason and right to be angry at the world and God, and be jaded and cynical, he just refuses to be any of those things. He lives his life fully and richly and that means that comedy is a daily occurrence,” Roday said. “It wasn’t so much about let’s bend what everybody perceives having AIDS as – instead, let’s make a movie about a guy’s life who happens to be stricken with HIV.”

Roday says he’s gained a better “perspective” on life after his experience making this film and working closely with Brown.

“You spend that much time with someone whose mortal coil can snap at any given time and their take on the world is hopeful and all they want to do is spread love, which is exactly what we need right now,” he said, “it’s a nice heat check of where you are in your life and what you think is important and how you’re handling yourself on a day to day basis as a man and as a human being.”

Pushing Dead made its festival debut on July 13 at Outfest in Los Angeles, and Roday is hopeful that the film will find a home, though he is aware of the “uphill” battle a quirky indie like this one faces.

“I recognize that it’s sort of a strange independent film that may be hard to classify and that means it’s hard to sell. But with a little bit of luck, it’ll at least find its way to some digital platforms,” he said, optimistically. “I do think it’s a movie worth seeking out because it’s rare that there’s a narrative that has the capacity to both move you and educate you.”

Photo: USA Network

Though Roday has moved on to the next phase of his career, he’s forever appreciate of his time portraying Shawn Spencer on Psych. When asked to put into words the impact the character and show had on his life -- “a whole quarter of my life,” he noted – the actor was reflective.

“In some ways, especially with social media, I feel like Psych has found another whole life since it went off the air,” he said. “People have discovered the show for the first time, like they’ve discovered a new toy.”

Psych rode off into the sunset in 2014 with a fitting series finale, but if the right circumstances allowed for Roday to reunite with cast members Dule Hill, Maggie Lawson, Timothy Omundson, Kirsten Nelson and Corbin Bernsen, he’s all in for a reunion.

“It seems like all the ingredients are there to do something,” he said. “I certainly feel like the fans deserve it. So much of Psych is predicated on two grown men running around acting like children that if you wait too long and we’re old and gray and limping around, I’m not sure it has the appeal. As long as it’s relatively soon and there’s still an appetite, I think it would be really easy to rally the troops and make something happen.”