So I do it like so
setCollisionCallback( inMaterial, this );
since I have to inherit IMaterialCollisionCallback for parm 2, this calls my class not a function. Is there a way to call a function?
I have to add this in my class
Code: Select all
virtual int ContactBegin(
irr::newton::IMaterialPair* material_pair,
irr::newton::IBody* body0,
irr::newton::IBody* body1) {
//do stuff
//refuse the contact (return 0)
return 1;
}
virtual int ContactProcess(
irr::newton::IMaterialPairAndContact* material_pair_and_contact
) {
//refuse the contact (return 0)
return 1;
}
void hitGround(){ m_bGrounded = true; };
to get to the callback, but that would be the same for each object? I need to call different functions.
I could test body0 compared to bod1, but that is silly redundant since I'm calling with body1->setCallBack ( body0 ); to begin with?
any ideas?