Mark Wahlberg's past work on a comedic drama helped him prepare for his role fighting giant robots in the upcoming Transformers 4: Age of Extinction, the actor told Empire

In the magazine's cover story of Transformers 4 for its latest issue, Wahlberg said while filming Ted he had to many times work with CGI since his costar was animated. He had to do the same again when filming Transformers 4, as he starred in scenes with the movie's computerized robots.

"Ted was a good tool to prepare me for this. Having to identify with things that aren't there," he said. "The bear prepared me for that."

Ted also involved some comically hard-core fight scenes between Wahlberg's character and his teddy bear best friend, which the actor said also geared him up for some green-screen action.

"And as embarrassing as doing things like the fight sequence with him were - throwing myself around a room for 12 hours while the crew just sat eating sandwiches and watching - it taught me how to do this s***," he said.

Wahlberg also spoke about Michael Bay directing the film, saying, "Michael has got a lot of great people around him, but he's still driving the train."

The Empire magazine cover featured Wahlberg, Nicola Peltz and Jack Reynor with a first look at Optimus Prime's new model for Transformers 4. The headline highlighted the project's filming locations -- "Detroit! Hong Kong! Cybertron!" -- suggesting that the film will show us the Transformers' home planet. 

Transformers: Age of Extinction comes out on June 2, 2014.

Watch a FLIX this first look teaser for the film: