"There were lots of parts of the movie where there was no script, and we would have to go with the flow and see what Robin would do," says Hammond, now 32, who played one of the Lost Boys in 1991's Hook.
"He was always encouraging me," he adds.
Even the film's final twist, in which Williams's Peter Pan grows up and passes his sword to one of the Lost Boys, was a surprise to the film's young stars.
"Nobody knew who it would be except Robin and [director] Steven [Spielberg]," Hammond tells PEOPLE. "I never thought it would be me. I was playing Thud Butt, just the funny little kid on the side. It wasn't until they said, 'Action,' and he just smiled really big at me and handed me the sword [that I knew]. To this day, when I see the scene I'm still always amazed."
Exceedingly friendly to everyone on set, "he really was truly Peter Pan," Hammond says. "His energy level alone. I never saw him down or even tired. The role really fit him."
Currently working on a short film, Thud Butt vs. Rufio, based on the Hook characters, Hammond had emailed Williams to see if he would be interested in making a brief cameo.
"Next thing you know I get a call from him. He said, 'Hey, Thud. This is Rob. What's goin' on?' " says Hammond, who has starred in his own music, magic and comedy show for 16 years.
"I was a little nervous, telling him I've been trying to be a director for years, and that I would love to have him literally be in the frame of the camera for a moment," he says. "He kind of giggled just for a second and then he said, 'Okay.' I held my breath and then he goes, 'Just tell me whenever you're ready.' I said, 'I'm in Kentucky, but when I get back I'll give you a call. And he said, 'Okay, beautiful.' "
"I'm still in shock that he's gone," Hammond says.
If you or someone you know is considering suicide, please contact the National Suicide Prevention Lifeline at 1-800-273-TALK (8255).
The Williams family is asking well-wishers to send contributions to charities close to the actor's heart in lieu of flowers. Suggested organizations include St. Jude Children's Research Hospital, Challenged Athletes, USO, the Muhammad Ali Parkinson Center, the Christopher and Dana Reeve Foundation and Glide Memorial Church in San Francisco.
For more on Robin Williams's tragic death and his legacy of comic genius, pick up the latest issue of PEOPLE, on newsstands Friday