Jim Carrey improvised Sonic the Hedgehog villain

Sonic and Jim Carrey

Jim Carrey ditched the script for his new movie Sonic the Hedgehog and improvised his portrayal of its villain Dr. Robotnik.

Carrey stars as speedy hedgehog Sonic's evil scientist nemesis in Jeff Fowler's big-screen adaptation of the much-loved Sega video game series.

However, Jim has now admitted that after he'd finished on set, very little of writers Josh Miller and Pat Casey's script was left intact.

"I absolutely had the best time," he told U.K. chat show host Graham Norton. "I opened the door and let the Mustang run. I'm not sure there's one word from the script in the movie! It was just pure fun - with no holds barred. I hope we get to do it again."

The film is the Canadian funnyman's first screen role in four years, as he has been focusing on his art and writing a book, Memoirs and Misinformation.

Speaking about the project, the 58-year-old: "It took me eight years to do. It's a study of persona and the fallacy of the human being and it's the only real way I can explain myself to people. It's a real look inside."

© Cover Media