shanefarris
22-04-2011 18:41:18
I have a ragdoll I am working with and need to have a report if anything hits it, specifically raycast to start with. I was that in the wrapper we need to specify which bodies will collide with other bodies that have a custom callback is that correct?
Is there a way to create a custom callback and have it be called if anything collides with it? Example, I create a raycast with 50 ragdolls in the scene, how do I create a callback that will handle any raycast hitting any actor in any ragdoll per frame?
Thanks.
mBodyA = makeBox(Vec3(0,3,0));
mBodyA->setContactCallback(this);
mBodyB = makeBox(Vec3(0,7,0));
mBodyB->setContactCallback(this);
mScene->setActorFlags(mBodyA, mBodyB, NxOgre::Enums::ContactPairFlags_All);
Is there a way to create a custom callback and have it be called if anything collides with it? Example, I create a raycast with 50 ragdolls in the scene, how do I create a callback that will handle any raycast hitting any actor in any ragdoll per frame?
Thanks.