Throughout his career, Jamie Foxx is known for heroic roles in such films as 'Miami Vice' and 'Django Unchained.' But it appears that he loves playing a bad guy now that he's portraying Electro in 'The Amazing Spider-Man 2.'

We showed you photos of the Oscar winner on the set of the new Spidey flick looking rather blue as the electrifying villain. From the metallic blue makeup to the varicose veins covering his face to the off-color contact lenses, Electro is one creepy-looking bad guy.

In an interview with Yahoo! Movies, Foxx said it was a thrill to play a villain for a change.

"Oh, man -- it's so much fun," he said. "The costume is great. They were very creative with it."

The 45-year-old Hollywood heavyweight says it took several hours a day just to put on his metallic blue makeup, but he was honored to play such a historic villain from the comic book series. "It's part of a remarkable legacy: Spider-Man," he explains. "I mean, when you're growing up as a kid, you know, that's everything. So to be able to be in that is just amazing."

The real test will come when geeks at Comic-Con see a snippet of the new 'Spider-Man 2' movie in July. Foxx seems confident that Spidey fan boys will approve of his portrayal of Electro.

"Now I'm just waiting to get to Comic-Con and see how people respond to it," Foxx says. "[Director] Marc Webb is a genius and Amy Pascal and everybody at Sony have just be[en] so gracious to allow me to have this opportunity. So it's cool."

'The Amazing Spider-Man 2' will sling into theaters in May 2014.