behavior when two similar material pairs are added

turkeypotpie

31-08-2006 22:40:59

Let's say I do this:

OgreNewt::MaterialPair* pair0 = new OgreNewt::MaterialPair(world_, mat0_, mat1_);
pair0 ->setContactCallback(new Mat0toMat1Contact);

OgreNewt::MaterialPair* pair1 = new OgreNewt::MaterialPair(world_, mat1_, mat0_);
pair1 ->setContactCallback(new Mat1toMat0Contact);

Will each of the contact callbacks be called? And if so, when is the collision valid? When both callbacks return 1 in userprocess? or just one of them?

walaber

01-09-2006 06:25:33

i believe only the last one will be called... IIRC Newton only allows 1 callback per pair. so the order doesn't matter.

turkeypotpie

02-09-2006 06:30:16

I guess I'll just have to try it out to make sure :) But yeah, that makes sense.

thanks! :)