mistigrii33
07-11-2011 20:41:06
Hi,
I'm trying to set a CallBack when something (it will only be my AnimatedCharacter) hit a Body.
myCallBack :
When my AnimatedCharacter hit the box, the onContact function isn't called. What am i doing wrong ?
I can't do something like
because wrong parameters type..
Thanks!
I'm trying to set a CallBack when something (it will only be my AnimatedCharacter) hit a Body.
Critter::Body* bonus1 = mRenderSystem->createBody(box_desc, NxOgre::Vec3(-100, 30, -100), "bonusMesh.mesh", bodyDescription);
MyCallBack* myCallBack = new MyCallBack();
bonus1->setContactCallback(myCallBack);
myCallBack :
class MyCallBack : public NxOgre::Callback
{
public:
MyCallBack(void);
~MyCallBack(void);
void onContact(const NxOgre::ContactPair& pair);
};
When my AnimatedCharacter hit the box, the onContact function isn't called. What am i doing wrong ?
I can't do something like
mScene->setActorFlags(bonus1, myAnimatedCharacter, NxOgre::Enums::ContactPairFlags_All);
because wrong parameters type..
Thanks!