James Gunn on How 'Guardians of The Galaxy Vol. 2' Impacted 'Avengers: Infinity War's Script

Before the the Guardians of the Galaxy could team up with the Avengers in dealing with the Mad Titan known as Thanos, they had to deal with their own planet-sized problems first.

With Guardians of the Galaxy Vol. 2 out of the way, fans can look forward to their eventual arrival on Earth in Avengers: Infinity War. But given the shared universe in Marvel Studios movies, how do they feed into each other?

Writer and director James Gunn recently revealed his script for the second Guardians film and offered some insight into the filmmaking process, including how he worked with the crew of the next Avengers crossover movie while making his film.

Gunn revealed that he didn't have to make any changes to his own film in order to fit into the events that would occur in Avengers: Infinity War. Instead, he just sent off what he was planning to do, and allowed Anthony and Joe Russo to incorporate his plans to what they were doing.

"The studio suggested no changes to make it more amendable to Avengers 3 or 4. I did, however, give [Christopher] Markus & [Stephen] McFeely and the Russo Brothers the script in October 2015 so they knew where the Guardians ended up while they were writing," Gunn wrote.

It's interesting that Marvel Studios box Kevin Feige gives his creative teams this much leeway, especially with the prominence of the MCU at this stage. And with Avengers: Infinity War serving as the culmination of every Marvel movie to date, it's not impossible to imagine there might be some changes in order to leave things in a place where the Russos can pick it up.

With Nebula off in search of her tyrannical father and the Guardians set to have a literal collision with Thor, it's not too hard to imagine what would bring them to Earth for a team up with the Avengers.

We'll find out what happens when Avengers: Infinity War premieres in theaters on May 4, 2018.