lag with collisionhandlergravity

hey everyone,

Im using the collisionhandlergravity to have my actor collide with the floor. It works except for the fact that he moves extremely slow.

I implemented a collision ray on my actor and set the from bitmask to GeomNode.getDefaultCollideMask()
I set the into bitmask on the floors to the same thing

then i have

lifter = CollisionHandlerGravity()
lifter.addCollider(self.puckColNp, ClassGlobals.p1.puckWalk)
ClassGlobals.collider.playerTraverser.addCollider(self.puckColNp, lifter)

where puckWalk is my actor and the puckColNp is the ray

My level model is pretty low poly already, so my question is what else can i do to cut down the lag?

Thanks in advance for the help

GeomNode.getDefaultCollideMask() is the value that is already assigned, by default, as the into bitmask for every piece of visible geometry in the world.

If you mean for your actor to collide with the visible geometry of the floor, then you don’t need to set this bit (since it’s already set). However, you should be aware that your actor will also test for collisions with every visible polygon in the world, including the actor himself! That’s probably not what you had in mind.

I’d suggest using some other bit instead–any other bit you like–for instance, BitMask32.bit(0). That way you will only test for collisions with things that you specifically set this mask on (like the floor).