Josh Duhamel, who has been in front of the camera for decades, is making his directorial debut in the comedy "Buddy Games."

The actor also produced and wrote the screenplay for the film, where he also plays a role. He said the whole enterprise was a labor of love. 

"It was definitely strange to be on the other side of [the camera] for auditions," he told Fox News. "I felt for [the actors] like you wouldn't believe because I know what it takes to try to get in front of somebody and perform in a sterile audition room. But the casting itself was mostly guys who were willing to do me favors."

Duhamel, 48, admitted that he needed actors who "were going to be believable as a group of friends that have been friends forever. And so I got very lucky."

JOSH DUHAMEL TO BE PAID $175G AS THE FACE OF NORTH DAKOTA AFTER CONTRACT EXTENSION

The ensemble cast includes Dax Shepard, Kevin Dillion, James Roday, Nick Swardson, and Dan Bakkedahl. Duhamel said it "feels like these guys would all know each other and (have) been buddies forever."

The story follows six lifelong friends who have a falling out so Bob (Duhamel) reunites his pals for the so-called Buddy Games, an insane competition of absurd physical and mental challenges with the chance to win a $150,000 pot. 

Josh Duhamel (C) behind the camera on 'Buddy Games.' 

Josh Duhamel (C) behind the camera on 'Buddy Games.'  (© 2020 Buddy Games LLC.)

Dan Bakkedahl told Fox News bonding with the ensemble cast was the highlight of making the film.

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

"Yeah, we were so fortunate. We were all staying in the same hotel. We were all eating breakfast downstairs and bumping into each other, walking to the mall across the street," the "Veep" star revealed.

"The few hours that we had spare, we were in the van together riding to set together," added Bakkedahl, "So there was a real camaraderie developing... kind of shooting the breeze together and developing a friendship in between takes."

L-R: Dan Bakkedahl (Shelley), Josh Duhamel (Bob), James Roday (Zane), Kevin Dillon (Doc), Dax Shepard (Durfy), Nick Swardson (Bender)

L-R: Dan Bakkedahl (Shelley), Josh Duhamel (Bob), James Roday (Zane), Kevin Dillon (Doc), Dax Shepard (Durfy), Nick Swardson (Bender) (© 2020 Buddy Games LLC.)

Bakkedahl said Duhamel made everyone feel like they were at summer camp while shooting in Canada and the actors' friendship carried over into real life as well. 

One thing they all bonded over was the insane stunts they had to pull off during the shoot -- everything from a paintball match to competing in an intense obstacle course with a huge slide. 

CLICK HERE TO GET THE FOX NEWS APP

"I would say the most dangerous thing we did was that big slide," Duhamel said. "Because it wasn't really built the way I was hoping ... Dan actually got what they call a ... hematoma. He banged his leg so hard that he literally couldn't stand up for half the movie. We had to prop him up and lay him down and elevate the leg throughout."

He added, "He's a warrior and finished the movie because we could have easily been shut down."

"Buddy Games" is out in theaters and also available on demand.