e.g. B C and D are btRigidBody.
If I set my special UserData to B & C, when B & C collide each other, it will call my custom collision response similar to this :-
Code: Select all
collisionResponseOverride(manifold , btRigidBody* B, btRigidBody* C){
if(B->userData()!=nullptr && C->userData()!=nullptr){ //override Bullet
manifold.firstObject.applyImpulse ( ....... )
manifold.secondObject.applyImpulse ( ....... )
return true;
}
return false; //let Bullet do it as usual B-D, C-D
}
http://www.bulletphysics.org/Bullet/php ... f=9&t=7400
http://www.bulletphysics.org/Bullet/php ... f=9&t=7481