In my code i set up a CollisionHandlerFloor to set the Z for my model, and a CollisionHandlerPusher to prevent it from walking trough walls and other model.
They act on the same CollisionNode, which has both a Ray casted down and a Sphere a little higher than ground to avoid the other objects.
The problem is when i add them to the traverse (base.cTrav in my case): in fact when i run the application only the last Handler added to the traverser is working.
Is there a way to have both the works done (setting Z and not going through objects) without involving heightfield, or not writing a lot of calculations on a simple CHandlerQueue (like in the Roaming Ralph)?
Thank you guys!
Now everything works correctly: i just replaced the creation of the collisionNodes and the add of a CSolid with the use of “attachCollisionSphere” etc., which i took from ynjh_jo’s post.
Anyway, i’m using on the same traverser 3 handlers without problems, so i think it’s allowed.
There is no limit to the number of CollisionHandlers per CollisionTraverser. (However, each CollisionNode may be associated with only one CollisionHandler.)