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])