'Wander' is an AI behavior where an AICharacter will move in a random direction to generate realistic movement around an environment with no goal position in mind.
In PandAI, 'Wander' is defined as :
aiBehaviors.wander(double wander_radius, int flag, double aoe, float priority)
where :
Wander Radius represents the degree of wandering. This is implemented via a guiding circle in front of the AI Character.
Flag represents which plane to wander in (0 - XY, 1 - YZ, 2 - XZ, 3 - XYZ). By default, it is in the XY plane.
Area of Effect is the radius from the starting point where the AICharacter would wander within.
priority is by default set to 1.0 and is used when using two or more steering behaviors on an AICharacter.
The velocity at which the AICharacter wanders is determined when you first create your AICharacter object using the AICharacter constructor.
The full working code for this in Panda3D :
#for directx window and functions import direct.directbase.DirectStart #for most bus3d stuff from pandac.PandaModulesimport* #for directx object support from direct.showbase.DirectObjectimport DirectObject #for tasks from direct.taskimport Task #for Actors from direct.actor.Actorimport Actor #for Pandai from panda3d.aiimport*