‘Seek’ is a behavior where an AICharacter moves in the direction of a target NodePath or position until it reaches that entity.

Video of this behavior in Panda3D:

In PandAI, seek is defined as : target, float priority) position, float priority)

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 seeks is determined when you first create your AICharacter object using the AICharacter constructor.


Seek’s direction is calculated only during the first instance of the call and so is more efficient than pursue, if all you want is an object to go to a point.

Here is a full program written implementing ‘seek’ using PandAI :

import direct.directbase.DirectStart
from panda3d.core import *
from direct.showbase.DirectObject import DirectObject
from direct.task import Task
from import Actor

from import *

class World(DirectObject):

    def __init__(self):
        base.disableMouse(), 0, 55, 0, -90, 0)


    def loadModels(self):
        # Seeker
        ralphStartPos = Vec3(-10, 0, 0)
        self.seeker = Actor("models/ralph",
                            {"run": "models/ralph-run"})
        # Target = loader.loadModel("models/arrow"),0,0),0,0)

    def setAI(self):
        #Creating AI World
        self.AIworld = AIWorld(render)

        self.AIchar = AICharacter("seeker",self.seeker, 100, 0.05, 5)
        self.AIbehaviors = self.AIchar.getAiBehaviors()

        #AI World update
        taskMgr.add(self.AIUpdate, "AIUpdate")

    #to update the AIWorld
    def AIUpdate(self, task):
        return Task.cont

w = World()

To get the full working demo for this, please visit: