So, it took me some time to figure out how to get getActiveTransforms() NOT to return NULL because of how I was setting the flag eENABLE_ACTIVETRANSFORMS.
Here’s what I did in the setup phase of the scene:
//scene initialization stuff scene = gPhysics->createScene(sceneDesc); scene->setFlag(PxSceneFlag::eENABLE_ACTIVETRANSFORMS, true);
And in the loop:
scene->simulate(1 / 60.0f); scene->fetchResults(true); PxU32 nbActiveTransforms; const PxActiveTransform* activeTransforms = scene->getActiveTransforms(nbActiveTransforms);
But activeTransforms was always NULL. To get it to work I had to change the setup phase like this:
//scene initialization stuff sceneDesc.flags |= PxSceneFlag::eENABLE_ACTIVETRANSFORMS; scene = gPhysics->createScene(sceneDesc); //scene->setFlag(PxSceneFlag::eENABLE_ACTIVETRANSFORMS, true);
So here are my questions. Was I doing something wrong? And if not, what is the difference between setting the flag in sceneDesc (PxSceneDesc) and setting it in scene (PxScene)?
P.S. I’m using PhysX-3.3.4.
Thanks in advance.