The VisualBots object model contains a full array of tools to facilitate object movement.
Moving with the Turn and Step Methods
The basic recipe for moving Bot objects is to execute the Turn and Step methods in combination. The Turn method changes the heading of a Bot object by a specified angle. The angle is measured clockwise relative to the current heading of the Bot object. So a positive angle would instruct the Bot to turn right, and a negative angle would instruct the Bot to turn left (a zero angle would be straight ahead). The Step method advances the Bot object by a specified distance (in coordinate system units) in the direction of the Bot object's heading. The default distance for the Step method is set by the Speed property. Below is a demonstration of simple Bot movement.

There are several different ways to move a Bot object randomly. The easiest is to use the TurnRand and TurnRand90 methods. The TurnRand method turns a Bot by a random angle within a specified range, while the TurnRand90 method turns a Bot by a random multiple of 90 degrees. Below is an example of two moving Bot objects - the blue Bot is moved using the TurnRand method and the red Bot with the TurnRand90 method.

Bot objects can be programmed to move based on the position of other objects using the TurnAwayFrom and TurnToward methods. The example below illustrates the use of the TurnToward method where line-shaped Bot objects are instructed to orient towards an "attractor" Bot which follows the mouse location.
