“You’ve got a friend in me,” go the lyrics to the Randy Newman tune that has been crooned in all of Pixar’s magical Toy Story films, including the latest. It’s a catchy little ditty, and it might even trick you into thinking the films are about friendship. But you’d be wrong.

Despite the buddy-cop trappings that made it seem like Woody and Buzz were starring in a plastic plaything spin on 48 Hours or Lethal Weapon, the Toy Story flicks have always been about the emotional tilt-a-whirl that is love — and more specifically, about family love. The 1995 original was a tale of sibling rivalry, with Woody (Tom Hanks) learning to make peace with the “new baby,” Buzz Lightyear (Tim Allen), stealing his owner Andy’s attention. Toy Story 2 pondered the risks and rewards of opening up to intimate connection. And this time around — in yet another Pixar triumph of profoundly felt storytelling — it’s time to talk about letting go.

Of course, because these guys are too sneaky just to serve up the vegetables of a moral, they wrap it in irresistible cotton candy. The 11 years since Toy Story 2 have passed almost in real time with a now-17-year-old Andy preparing to leave home for college. That’s not great news for a bunch of childhood toys, with Woody, Buzz, and company facing the prospect of either attic storage or donation to a daycare center. But while a sentimental Andy intends the former, a mix-up finds the toys barely escaping the garbage and on their way to Sunnyside Daycare.

At first, it seems like the gang has lucked out. The de facto leader of the daycare center’s toys, a strawberry-scented stuffed Lots-o’-Huggin’ Bear (Ned Beatty), welcomes them all warmly, and there will be kids to play with them for the first time in years. Then the rampaging toddlers show up — and a plan for escape starts to form.

In typical Pixar form, the adventure elements from director Lee Unkrich are splendidly and inventively choreographed. Woody’s solo dash from captivity is a snappy set piece, and the complex, Great Escape-type plan of those who eventually follow includes some hilarious moments, including Mr. Potato Head (Don Rickles) being forced to attach his features to a floppy flour tortilla. There are great new additions like a foppish Ken doll (Michael Keaton) and a stuffed hedgehog named Mr. Pricklepants (Timothy Dalton) with serious thespian pretensions. There are also giddy details galore, like a Speak-n-Spell being turned into a casino game for the daycare toys’ after-hours amusement or the retro fashion show that allows Ken to show off his extensive wardrobe (including Nehru jacket!).

But this is also a Toy Story with a unique sense of the passage of time. A generation has grown up with these characters and think of them as family. But in Toy Story 3, we also see characters facing the kind of complex decisions every family faces. When a climactic moment finds them linking hands during a crisis, it’s one of the most genuinely lump-in-the-throat movie moments since … well, probably since the last Pixar movie.

It might seem at first glance that Toy Story 3 is merely riffing on the same aforementioned theme already nailed in Toy Story 2, including a montage that recalls the heartbreaking “When She Loved Me” sequence. In fact, Toy Story 3 is actually taking that concept — the risk and inherent pain in any intimate relationship — to an even more sophisticated level. As the final 20 minutes of the film play out, screenwriter Michael Arndt (Little Miss Sunshine) spins us through the wrenching landmark moments when family members need to say their goodbyes and feel the ache of transitions. What continues to astonish moviegoers about the Pixar films is the way they manage to pair blissful entertainment with the miraculous experience of being human — and in Toy Story 3, that includes the wonderful, awful, vertiginous experience of sharing a home, a history, and a heart.