(LOS ANGELES) -- Jamie Foxx plays the villain in The Amazing Spider-Man 2. On Friday's Good Morning America, Foxx explained how his character turns from Max, an awkward, nerdy engineer, into Electro, an electricity-generating bad guy, in the film.
"In his mind he thought that Spider-Man was really his best friend," Fox explains. "They were hanging out, celebrating birthdays, turning up at the club or whatever in his head. And then when he sees Spider-Man and it doesn't go his way, and the people see this bluish character, he chooses the other side."
Foxx is usually known as the funny guy in films, but the actor said it was easy to play the bad guy, especially after he spent four hours in the makeup chair. "It really helps with the character. Like once you get the blue make up on, it seems like the voice started to change," he said. "You started to feel it."
Foxx definitely enjoyed being the bad boy in the film, saying he fulfilled a life-long fantasy. "We lie a lot in Hollywood about genuine moments," he explained. "But in this when I saw Andrew Garfield in his [Spider-Man] outfit and me in my outfit it was like, 'Wow, man. We get a chance to really live out our childhood dreams.'"
The Amazing Spider-Man 2, which also stars Emma Stone as Gwen Stacy, is rated PG-13.
Copyright 2014 ABC News Radio