Sparks were flying on the set of "The Good Girl," according to Jake Gyllenhaal, who admitted he had a "crush" on co-star Jennifer Aniston. 

"The Guilty" star, 40, opened up about his former screen partner during an appearance on "The Howard Stern Show" and admitted it was tough to film love scenes with Aniston, 52, while working on the 2002 romantic drama due to his infatuation. 

"[Filming the sex scenes] was torture, yes it was," Gyllenhaal said on the show as he laughed. "But it was also not torture. I mean, come on, it was like a mix of both. 

Jennifer Aniston and Jake Gyllenhaal previously dated. Recently, the actor opened up about working with Jennifer Aniston on the set of ‘The Good Girl.’ (John Shearer/WireImage)

DAVE BAUTISTA REVEALS ‘REALLY BAD’ FIRST TATTOO THAT HE REGRETS 

"Weirdly, love scenes are awkward, because there are maybe 30, 50 people watching it? That doesn’t turn me on," he continued. "It’s oddly mechanical. And also it’s a dance, you’re choreographing for a camera. You can get in it, but it’s like a fight scene, you have to choreograph those scenes." 

The "Brokeback Mountain" actor also explained that a certain method was used that involved a pillow. "The pillow technique was used," he said. "That was just preemptive and used generally always when actually in a horizontal place in that movie." 

He said, "I think that was actually a Jennifer suggestion. She was very kind to suggest it before we began. She was like, ‘I’m putting a pillow here.’ " 

Gyllenhaal and Aniston at the premiere of ‘The Good Girl’ in 2002. (Kevin Winter/Getty Images)

In 2016, Gyllenhaal first revealed his crush on the "Friends" star. "She’s a rough one, you know, not likable. So hard to compliment," he told People. "I will say, I had a crush on her for years. And working with her was not easy… I was – um, yeah. That’s all I’m going to say. It was lovely. It wasn’t hard, that’s what I would say." 

Gyllenhaal admitted at the time that he wasn’t a fan of the hit NBC sitcom but was stunned by her "personality from afar, and movies she was in." 

While Gyllenhaal just made his first red-carpet appearance with model girlfriend Jeanne Cadieu, Aniston recently said she’s ready to date again

"No one of importance has hit my radar yet, but I think it’s time. I think I’m ready to share myself with another," the former "Friends" star told Bruce Bozzi on SiriusXM’s "Radio Andy." 

Jennifer Aniston arrives at the SAG awards in 2020.

Aniston was married to Brad Pitt from 2000 to 2005 and Justin Theroux from 2015 to 2017. (Leon Bennett/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP 

"The Morning Show" actress expressed that she has been in relationships for nearly 30 years — Aniston was married to Brad Pitt from 2000 to 2005 and Justin Theroux from 2015 to 2017 — but really enjoyed her time on her own for the past several years. 

"I didn’t want to [date] for a long time, and I loved really being my own woman without being a part of a couple," she said. "I’ve been part of a couple since I was 20, so there was something really nice about taking the time."