Peter Ostrum, who played Charlie Bucket in Willy Wonka and the Chocolate Factory, shared a touching tribute to his former co-star Gene Wilder just one day after the beloved actor's death.

The former child star described Wilder's death as "kind of like losing a parent". Ostrum hadn't seen the legendary star since filming Willy Wonka in 1971, but said it was "still a shock".

"It's kind of like losing a parent," Ostrum told Variety. "You know it's going to happen, but it's still a shock. He was not in good health at the end and it was not unexpected by any means, but when it happens, it hits you like, 'Gene is gone and there will never be anyone like him again.'

More from Spy:
Why celebrities like Gene Wilder choose a private death
From Frankenstein to Willy Wonka: Gene Wilder's finest moments


"He was a gentle man, but he was also a gentleman. He treated people with respect and dignity."

Ostrum, now 58, was chosen at the age of 12 from a pool of thousands of young hopefuls hoping to land the part of Charlie Bucket in the adaptation of Roald Dahl's children's book.

Willy Wonka is Ostrum's only film credit. He is now a veterinarian in northern New York.

"Gene's wit and humour spoke to many generations of film audiences," Ostrum commented to ABC News. "He was a unique talent that brought joy to all of us that followed his long career."

"As a young actor filming Willy Wonka, I had the rare privilege of working with Gene who I greatly admired," he said. "He became my mentor and personal friend. For that I will always be grateful. So shines a good deed in a weary world."

Wilder passed away on Sunday at the age of 83 of complications from Alzheimer's disease. Many of his other Willy Wonka co-stars have paid tribute to the late actor.