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.eve1GroundCol = CollisionNode('eve1Ray')
        self.eve1GroundColNp = self.eve1.attachNewNode(self.eve1GroundCol)
        self.eve1GroundHandler = CollisionHandlerQueue()
        self.cTrav.addCollider(self.eve1GroundColNp, self.eve1GroundHandler)
        for e in range (20):
            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 (, 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”).