Contact callback in TestAdvancedVehicle

In this code:   

ContactCallback myCallBack = new ContactCallback() {

    DynamicPhysicsNode node1, node2;

        public boolean adjustContact( PendingContact contact ) {

            boolean isNode2 = contact.getNode1() == car.getChassis() ;

            boolean isNode1 =  contact.getNode2() == car.getChassis();

if (isNode2 && isNode1){

contact.setIgnored(true);

System.out.println(contact.getNode2().getName() + contact.getNode1().getName());

return true;



}

return false;

}

    };

the only contact that is print

Maybe because the name is null? What are you trying to achieve?

irrisor, you have reason.

Do you know how ignore contact beyond chassis with other all element of the car? because i have realized with an example static phisc box but only partial car is ignored in the contact, only tha chassis by getchassis.

I don't get it, sorry.

Antonio,



In this example (TestAdvancedVehicle) the wheels ignore the contacts with the chassis. You can see how this is done and duplicate for whatever needs.



BTW, I fixed the folder in the server and my downloads are back again. You can checkout Dirty Racers at:

http://www.infoway-pi.com.br/erick/DirtyRacers-beta1.zip