In the cave by Jamie’s ranch, hitting rocks and crystals will cause smoke to appear. Yellow smoke makes you move faster, orange smoke freezes you, black smoke gets in your eyes so that the area of light around you gets smaller, purple smoke confuses you, pink smoke makes your stamina go up, and white smoke disables the effect of the other types of smoke.
Inside the Moonlight Cave, you will usually find purple smoke whenever you break a crystal. When the smoke makes you dizzy, turn the controller so that your right hand is at the top and move the joystick on the bottom as if the controller were in the correct position. This should fix the walking problem while the smoke is still in effect.