Relax Distance is the distance from the panic distance radius after which the object should stop evading once evade has been initiated.
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 evades is determined when you first create your AICharacter object using the AICharacter constructor.
Note: 'Evade' recalculates the direction every frame and so is less efficient than Flee for a static object.
The full working code in Panda3D :
import direct.directbase.DirectStart from panda3d.coreimport* from direct.showbase.DirectObjectimport DirectObject from direct.taskimport Task from direct.actor.Actorimport Actor #for Pandai from panda3d.aiimport* #for Onscreen GUI from direct.gui.OnscreenTextimport OnscreenText
# Globals speed = 0.75
# Function to put instructions on the screen. font = loader.loadFont("cmss12") def addInstructions(pos, msg): return OnscreenText(text=msg, style=1, fg=(1,1,1,1), font = font, pos=(-1.3, pos), align=TextNode.ALeft, scale = .05)