The VisualBots object model provides functionality for objects to sense each other's presence and to interact.
A Bot object's interaction space defines the surrounding area within which a Bot is aware of the presence of other objects. Objects located within this area can be processed by methods that facilitate object-to-object interaction. You define the interaction space of a Bot object through the use of the ViewField object. Two parameters define the ViewField - the Radius and Span properties. The Radius defines a circle centered on the Bot's location and Span is an angle between 0 and 360 degrees defining what portion of the circle captures other objects. Specifying a span of 360 degrees would capture objects that fall anywhere within the circle. A span of 180 degrees would capture objects in a semi-circle located in front of the Bot.

The ViewField area for each Bot can be displayed during a simulation using the Show method of the ViewField object, as in the example below.

Interaction Methods that Return Objects and Collections
There are a number of interaction methods in VisualBots that return Bot, Cell, Group and Region objects. These methods allow Bot and Cell objects to manipulate objects around them. For example the GroupNear method for the Bot object returns a group of Bot objects in the surrounding area, defined by the Bot's ViewField. Other methods that return references to surrounding objects are RegionNear, Closest, CellHere, Adjacent4, Adjacent8, Clone, and BotsHere.
Methods that Interact with Other Objects
There are a number of methods in VisualBots that allow an object to take some action based on the presence and location of another object. For example, the AngleTo method returns the angle to another object. The Bot can then use this information to alter its current heading in some way. Other methods that return information about surrounding objects are the DirTo and DistTo methods. These methods can take either Bot, Cell, or VPoint objects as arguments.