Olivia Wilde says that making "s***** movies" helped prepare her for directing.

The 38-year-old star has helmed the much-anticipated new movie 'Don't Worry Darling', which features Harry Styles and Florence Pugh in the lead roles, and revealed that her forgettable acting experiences have shaped her approach behind the camera.

In a conversation with Maggie Gyllenhaal for Interview Magazine, Olivia said: "It helps me navigate any feelings about movies that I don't think are great when I look back on them, and it helps me understand them within the context of my proxy film school experience. I've made like 5,000 times more s***** movies than you have."

She continued: "I've been in some really bad ones, and now I think, 'I did those to learn all the cautionary tales that would help me define myself as a director: how I will never speak to a crew, how I will never speak to actors, how I will never schedule a movie.' All of that comes from those bad experiences."

Olivia recalled how working with Mark Duplass on the 2015 horror film 'The Lazarus Effect' had a lasting impact on her evolution into directing.

The 'Booksmart' filmmaker said: "I remember making this tiny horror movie with Mark Duplass many years ago, and he was so understanding of this really terrible schedule that we had.

"The movie was very challenging for all these seemingly avoidable reasons, so I'd go back to the trailer and want to talk mad s***. And Mark said, 'Until you direct a movie, you can't really understand how difficult it is. Go direct, go produce, and then you'll understand', and he was right."

Olivia has a supporting role in 'Don't Worry Darling' and revealed that she only cast herself out of necessity.

She explained: "We basically ran out of money and I needed someone who would take a really low salary, but I wanted it to be someone who understood the role.

"It got to the point where it was down to the wire and our casting director was like, 'Olivia, why don't you just do it?'"