The Hairspray star has a quick sexual encounter with Dunst's character in the upcoming film, and has confessed that he found the scene to be difficult to shoot.
"Those are always daunting scenes when you see them on the schedule," Marsden told E! Online. "You're counting the days."
He went on to say that he also had trouble with the scene because he kept picturing his co-star from her role in Interview with the Vampire, where she was just 12 years old.
"Don't think that didn't cross my mind when we were on a bathroom counter in some random bar in New York," Marsden said. "But she's as cool a chick as it gets. Once I knew Kirsten was game, it was much easier to do the scene."
Marsden recently confessed that his role on 30 Rock forces him to keep up with pop culture trends.
The actor's wife filed for divorce in late 2011 after more then ten years of marriage.
Bachelorette opens in the US on September 7. A UK release date has not yet been announced.