For those adrenaline junkies who don’t get enough of a thrill riding a regular roller coaster, Six Flags Magic Mountain in Valencia, Calif., is adding virtual reality to the mix.

In a partnership with electronics giant Samsung, Six Flags plans to strap virtual-reality goggles onto riders of the park’s Revolution roller coaster so they can feel the twists, drops and climbs of the coaster track while watching images of a midair battle with space aliens.

The images in the goggles, created with the help of technology firm Oculus VR, are synced to the motion of the coaster.

The virtual-reality element is part of a new feature that will be added to roller coasters at nine Six Flags parks across the country. The images shown on the virtual-reality goggles will be modified for each of the rides at the nine parks.

At Magic Mountain, Six Flags is upgrading an area around the roller coaster, which opened in 1976, and renaming the ride the New Revolution. The overhauled coaster and the virtual-reality feature will be offered this spring.

Six Flags doesn’t have a monopoly on the idea. Europa Park in Germany added virtual reality to one of its coasters last year, and a theme park in England announced plans in January to do the same.

The advantage of the technology is that roller coaster operators can create new virtual-reality software for the goggles on a regular basis, enabling the park to draw repeat visitors to the same ride, theme park experts say.

“They can change the story to have aliens or it can take place in a submarine,” said Dennis Speigel, president of International Theme Park Services. “They can change it annually — just rewrite the software rather than spend $25 million for a new coaster.”

Speigel, who tested Six Flags’ virtual-reality goggles in a conference room last week, said he could see the midair battle with space aliens take place around him by spinning in an office chair.

The upgrade at Magic Mountain comes as the thrill park faces stiff competition for visitors.

On April 7, Universal Studios Hollywood is set to open the Wizarding World of Harry Potter, a six-acre expansion that is certain to draw fans of the boy wizard.

At Disneyland, the park has added several new “Star Wars”-themed features. Walt Disney Co. Chief Executive Robert Iger said last week that construction will begin next month at the Anaheim park for a new 14-acre land based on the films.