Framerate problem v2

Hello ,
I have some framerate problems…I tried pstats to find out where is the problem and the collisions are the main problem…I tried to octree my level egg but nothing happen.The problem remained.My level has 20 NPCs wandering around and 20 items that can be collected, all collide with the ground,made in the creation of the level.Am I doing something completely wrong?

        self.eve1GroundRay = CollisionRay() 
        self.eve1GroundRay.setOrigin(0,0,1000) 
        self.eve1GroundRay.setDirection(0,0,-1)
        self.eve1GroundCol = CollisionNode('eve1Ray')
        self.eve1GroundCol.addSolid(self.eve1GroundRay) 
        self.eve1GroundCol.setFromCollideMask(BitMask32.bit(1))
      
        self.eve1GroundCol.setIntoCollideMask(BitMask32.allOff())
      
        self.eve1GroundColNp = self.eve1.attachNewNode(self.eve1GroundCol)
        self.eve1GroundHandler = CollisionHandlerQueue()
        self.cTrav.addCollider(self.eve1GroundColNp, self.eve1GroundHandler)
        self.eve1GroundColNp.show()
        self.evesGroundColNp=[]
        self.evesGroundHandler=[]
        for e in range (20):
              self.evesGroundColNp.append(self.eves[e].attachNewNode(self.eve1GroundCol))
           
            self.evesGroundHandler.append(CollisionHandlerQueue())
            self.cTrav.addCollider(self.evesGroundColNp[e], self.evesGroundHandler[e])

I dont think so, what you say sounds very bad. I bet you have some loop that create way more collisions then you think.

If thats still a problem run your collisions are lower sycles. Like 5 times a second and then interpolate how your NPC’s move about.

you may be using the visual model as collision object. It’s highly recommended that you use the special collision solids (panda3d.org/manual/index.php/Collision_Solids), it will make a massive speed difference. If you want to use polygons as colliders you should modify the egg-file (search for “polyset keep descend”).