But Foxx remembered the lengths that the fellow went to get close - casing the hotel, learning the name of the food-service company, obtaining a shirt from a deli that made deliveries, gaining access to the building.
"It wasn't hard for me to draw from real life," Foxx said of Max Dillon, a man who turns a chance meeting with Spider-Man into obsessive hero worship that takes on increasingly sinister amplification.
"Max is like that super-fanatic who doesn't even know that he's lost himself in an idea of who Spider-Man is," Foxx said.
Watching his performance is like watching a miniature, intuitive essay on the way fixation with celebrity can turn from apparent adoration to something more threatening.
It's part of a performance marked by a startling physical transformation. Foxx gives much credit to his sister, who works as his stylist. (Foxx jokes that he wanted to be "the first black man with a comb-over").
"I wanted the look of Max to be something that kids, especially, will get a good chuckle out of. They'll see Max and immediately laugh, because he's kind of a mess."
Foxx later dons a leather suit as Max morphs into Electro - his face glows blue and he lowers his voice to an Eastwood-y growl, although his job on screen is mostly to strike dramatic poses while digital 3D lightning bolts shoot from his hands.
Director Marc Webb, though, wanted Oscar-winner Foxx for his ability to do character work, knowing that audiences will care about Electro only if they first get to know him as Max.
Bringing Foxx on board wasn't easy. He's getting harder and harder to sign these days, and has talked publicly about cutting back on his acting workload.
"I think what it is, is you sort of run out of good things to do, so you have to pull back a little bit, try to find something you really like," said Foxx, who in a span of a few years won an Oscar for "Ray" and was nominated for "Collateral" that same year.
That's a hard level to achieve, let alone preserve.
"I talked to Sidney Poitier once, and he said, 'I just didn't do things just to be doing things.' "
Foxx said he certainly wouldn't turn down lucrative offers, but really wants to look for roles that artistically "move the needle a little bit."
His next move-the-needle project is a new movie version of "Annie." He's taking the Daddy Warbucks role (renamed Will Stacks), and Annie will be played by enchanting "Beasts of the Southern Wild" star Quvenzhane Wallis, 10, whom Foxx said has unbelievable camera-grabbing gravity for an actress her age - "a natural talent."
Foxx said he gets to sing (he appears on the new trailer singing "Hard Knock Life" with Wallis), and said the new soundtrack and movie are in good hands - produced by Jay Z and Will Smith.
"You know there are some people in our business who know how to find something and turn it into gold. That's Will Smith," said Foxx.
Foxx also praised Jay Z, who, of course, sampled original "Annie" music for his own hit version of "Hard Knock Life." Foxx said that Jay Z will write new songs for the movie, which also draws on the talents of the movie's original lyricists and composers.
The movie is scheduled for release this Christmas. Beyond that, Foxx is coy on what his next project might be - he deflected rumors of a cop thriller with Leonardo DiCaprio.
"We're going to let 'Annie' come out and work from there," said Foxx, who has an ambition to direct, and is actively looking to develop movie projects for himself.
He admits, though, that he'll never be idle for long, because he's an entertainer at heart, and often a ham.
On the the set of "Spider-Man," he wandered off the set in his Max Dillon nerd outfit - comb-over, coke-bottle glasses and pocket protector.
"Some people didn't recognize me," he said. "But some did and were like, 'What's going on with Jamie?' "