THE WOODLANDS, Texas — If you want to use a nuclear weapon to save the world from an asteroid, don't try to do it the way Bruce Willis did in "Armageddon," NASA's planetary defense office would like to remind you.

"If you've seen those movies, they're completely bogus," Lindley Johnson, the planetary defense officer at NASA headquarters, said during a media session on asteroids and the art of protecting Earth from them held at the Lunar and Planetary Science Conference taking place here this week. "That's not how we would use a nuclear explosive device to do this at all."

But nuclear weapons are one of three techniques planetary defense experts have their eye on for nudging an asteroid off course if its orbit seems to be carrying it too close to Earth for comfort. Another method, impacting an asteroid, will be tested for the first time during the Double Asteroid Redirection Test , a NASA mission scheduled to launch in June 2021 and collide with an asteroid's moon in October 2022.

Related: 7 Great Movies with Earth-Threatening Asteroids

Another tactic would use gravity to slowly tug an asteroid far enough off course to miss Earth. And then there's the nuclear option, which is the best option for larger asteroids more than 0.6 miles (1 kilometer) or so in diameter.

All three of these techniques take the same basic approach: adjust the asteroid's orbital speed so that its path no longer intersects with our own. "We just need to change that speed by maybe a couple of centimeters per second," Johnson said. "If we do that several years in advance, the change that occurs in the orbit as it comes around several years later to that impact point — the change in velocity will cause it to arrive early or late to the impact point. That's all we need."

To get that change in velocity from a nuclear explosion, however, there's no need to actually touch the asteroid directly, Johnson said. Instead, the trick is to set off the explosion a few hundreds of meters up. "That causes an irradiation of the surface of the asteroid on that side, heats it up, superheats the surface," he said. "That surface will then blow off from the asteroid."

And because the laws of physics still apply, that dramatic action triggers an equal and opposite reaction, with the asteroid rebounding away — precisely what's needed to avert a catastrophe here on Earth. You wouldn't even need to fall into orbit around the object if you planned the mission carefully enough, Johnson said, a flyby would do.

It was a nice thought, Bruce.