“Pan” produced no Neverland magic at the box office.

The fantasy, which cost an estimated $150 million to produce, earned $15.5 million in its opening weekend, according to Rentrak estimates Sunday. Early tracking did not look promising for the Joe Wright-directed film but still predicted that “Pan” would open at least in the $20 million range.

The PG-rated epic, sold as a Peter Pan origin story and a lavish visual feast, has had a bumpy ride from the beginning, starting when actress Rooney Mara, who is white, was cast as Tiger Lily, who is historically Native American. The film, starring Hugh Jackman and Garrett Hedlund, also had been pushed from July to October. It has not been well-received by critics, either.

“This had a lot going against it,” said Paul Dergarabedian, a senior media analyst for Rentrak.

He also believes competition in the family market from the Halloween-themed animated feature “Hotel Transylvania 2” hurt “Pan.”

Sony’s high-wire spectacle “The Walk” also stumbled in its first weekend in wide release, after debuting on IMAX screens last week. The tale of Philippe Petit’s tight-rope walk between the towers of the World Trade Center earned $3.7 million this weekend, bringing its total to $6.4 million. Joseph Gordon-Levitt stars in film directed by Robert Zemeckis.

Not all was bleak at the box office, though. Ridley Scott’s space adventure “The Martian” earned a solid $37 million in its second week in theaters, nabbing the top spot once more. Its domestic total now stands at $108.7 million.