Collision Handler Floor has no effect on object

ballStartPos=self.environ.find("**/start_point").getPos()
self.ball =  loader.loadModel("models/ball")
self.ball.reparentTo(render)
#self.ball.setScale(1)
self.ball.setPos(ballStartPos)

self.cTrav = CollisionTraverser()
        
self.ballGroundRay = CollisionRay(0,0,0,0,0,-1)
self.ballGroundCol = CollisionNode('ballRay')
self.ballGroundCol.addSolid(self.ballGroundRay)
self.ballGroundCol.setFromCollideMask(BitMask32.bit(1))
self.ballGroundCol.setIntoCollideMask(BitMask32.allOff())
self.ballGroundColNp = self.ball.attachNewNode(self.ballGroundCol)
self.ballGroundHandler = CollisionHandlerFloor()
self.ballGroundHandler.addCollider(self.ballGroundColNp, self.ball)
self.cTrav.addCollider(self.ballGroundColNp, self.ballGroundHandler)

CollisionFloorHandler doesn’t seem to chagne the z coordinate of my object and the object just floats in the air. Did I set it up correctly?
[/code]

Are you calling traverse() every frame on the cTrav?

Thanks for the quick reply.

Turns out I forgot to set the mask for the ball object so the collision ray was detecting a collision with the ball which made it not move.