Robert Downey Jr.'s on-set injury while filming 2013's Iron Man 3 actually ended up helping the film's production, according to producers.

The new book The Story of Marvel Studios: The Making of the Marvel Cinematic Universe, written by authors Tara Bennett and Paul Terry, details the film's production following Downey's accident on the Iron Man 3 set. While filming a stunt, the Tony Stark actor injured his ankle, which ultimately led to a temporary halt in production. According to producer Stephen Broussard, this sudden hindrance allowed him, director Shane Black and co-writer Drew Pearce to iron out any remaining kinks in the film's third act. "We suddenly had the space and time to figure it out," he said.

RELATED: Captain America: Robert Downey Jr Helped Convince Chris Evans to Take the Role

At the time of the production halt, Digital Domain, the company handling the VFX for the film's third act, namely the House Party Protocol sequence that involved dozens of Tony Stark's suits, filed for bankruptcy. "Weta Digital then stepped in and absolutely crushed it," Broussard said. Not only that, but during the downtime, the production was also able to secure Brian Tyler as Iron Man 3's composer, who started work on the film's score much earlier, allowing him a longer lead time.

The film had been shooting in North Carolina at the time, they continued filming for any scenes without Downey. By the time the actor was able to return to the set, his ankle had not fully healed, so that time was used to complete static or limited-mobility shots of Tony Stark -- anything to limit Downey's movement as much as possible. By doing this, the actor's ankle healed as quickly as possible and he was able to reach full mobility for the rest of the shoot.

RELATED: Shang-Chi: Aldrich Killian's Iron Man 3 Goal Can Still Be Realized

Iron Man 3, the third film in the Marvel Cinematic Universe's Iron Man trilogy, was recently described by filmmaker Kevin Smith as one of Marvel's first true auteur films, crediting director and co-writer Black with changing the blueprint for storytelling in the MCU. "They've got a story, a never-ending story that they want to tell, and I want them to tell that, but it is breathtaking when you see somebody come in and do something different with the movie," said Smith.

The Marvel threequel has since been labeled as a Christmas movie by Disney+ based on its holiday backdrop. In the same book, Black, who has written films like Lethal Weapon and directed Kiss Kiss Bang Bang, explained why many of his films, including Iron Man 3, take place during Christmastime. "It creates its own little encapsulated event in time," he said. "Christmas bands together and cements a story. You feel like there's a common unity among all the people in it. It's just something [audiences] constantly notice in the background. It represents a flavor, and there is a sense that 'We are all in it together.'"

The Story of Marvel Studios: The Making of the Marvel Cinematic Universe is comprised of over 500 pages across two volumes of interviews with executives, cast and crew from all corners of what has become the highest-grossing movie franchise of all time.

KEEP READING: Marvel Planned Hydra's Infiltration Before Agents of SHIELD Was Developed

Source: The Story of Marvel Studios: The Making of the Marvel Cinematic Universe