For inspiration in his upcoming rom-com “Palm Springs,” Andy Samberg turned to a galaxy far, far away.

The film — which premiered at Sundance and also stars Cristin Milioti and Camila Mendes — takes place at a wedding in California. To prepare, Samberg said he watched Hayden Christensen’s Anakin Skywalker and Natalie Portman’s Queen Amidala say “I do” in “Star Wars: Attack of the Clones.”

That planet is all beautiful,” he joked. “To me, it’s like the perfect wedding.”

Though the cast and crew are keeping plot details mostly under wraps, director Max Barbakow described the film as “fun” and “a little bonkers.”

We’re subverting a lot of the tropes you usually see in wedding movies and rom-coms,” Barbakow said. “Tonally, it’s that really nice charged area between laughter and deep feeling and then just bonkers stuff. We’re trying a lot of things.”

Read more on “Palm Springs” here.