contact points and forces

bach

16-01-2007 12:34:53

A small missing feature ...

It seems that NxContactPair *mContactPair in customContactReporter is never set to, and I need it for contact forces calculation. :)

anyway a fix is really easy ..
in nxOgre's nxOgre_contactreporter.cpp , in function void contactReporter::onContactNotify(NxContactPair& pair, NxU32 events)

after each iterator loop;
for(std::vector< customContactReporter* >::iterator i = mReporters.begin();i != mReporters.end();++i) {
(*i)->mContactPair=&pair; // <-add
...
the above line should be added. There are 3 additions in total (for start touch, end touch, and touch)

@betajaen is this what you had in mind for the mContactPair variable ?

betajaen

16-01-2007 12:53:11

Done ;)

bach

16-01-2007 13:20:51

great :)

(that was fast)