Some embodiments of the invention provide methods and apparatus for controlling any aspect of a virtual environment in a mobile or wearable device, where the user is performing a gait activity such as walking, jogging or running, and the controlling is performed leveraging the gait characteristics of the user. In some embodiments, the gait characteristics include velocity and stride length. In some embodiments, the only sensors utilized to obtain any contextual information are accelerometers.