PandaSteer 2

Note that, as long as you are creating geometry specifically for collisions, you might as well create CollisionNodes instead of GeomNodes (which are optimized for collisions instead of rendering, and so are faster for the collision test).

Easiest way to do this, since you are already using the egg library, is to put the CollisionPolygons under a GroupNode, and add the “barrier” object type to that group, like this:

data4Collision = EggData()
gn = EggGroup('group')
data4Collision.addChild(gn)
gn.addObjectType('barrier')
gn.addChild(polyColl)
rectNode = loadEggData(data4Collision)

Note that optimal number of quads per group is probably a bit more than one. :slight_smile:

David