Release character controller in PhysX 3.x [SOLVED]


I am currently migrating my application from PhysX 2.8.4 to PhysX 3.2.4.

In PhysX 2.8.4, the class NxControllerManager had a “releaseController” function that I could use to remove a character controller (on the server side, when the corresponding player disconnects).

Now, in PhysX 3.2.4, this function does not exist any longer. As a consequence, I cannot find how to remove a character controller in PhysX 3.2.4.
I could maybe use the “purgeControllers” function to remove all the character controllers and re-create them, but this solutions seems a bit brutal to me…

I also tried to use the function “release” from class PxController, but my application crashes when I call this function…

Has anyone experienced the same issue?
Does anyone know how to remove a character controller in PhysX 3.x?


If the question is still urgent?
The function release () from class PxController works for me normally, but the mistakes can arise if at first remove actor and then character controller or when is started simulation.

You are right, I was deleting some things twice, which is why the release() function was crashing.
Now the issue is fixed, thanks!