Closed haubna closed 3 years ago
You are right, I skipped the getActiveActors function becauso both the returned raw pointer / array and the primitive int passed in by reference and used as an output parameter don't map well to Java.
However, it should be possible to write a small wrapper function which maps that to something that can be used from Java.
Was indeed not too hard, it's in the dev branch now. Here is how it works:
Vector_PxActorPtr activeActors = SupportFunctions.PxScene_getActiveActors(scene);
int nbActiveActors = activeActors.size();
for (int i = 0; i < nbActiveActors; i++) {
PxActor actor = activeActors.at(i);
}
I will wait a bit longer until I publish a new lib version in case more stuff comes up...
Perfect, thanks! :)
Maybe I am unable to find the proper function but I think this one is missing: https://gameworksdocs.nvidia.com/PhysX/4.0/documentation/PhysXGuide/Manual/RigidBodyDynamics.html#active-actors
It would probably improve performance for sleeping objects quite a bit by avoiding to update them.