Hi, I just want to roll this up with a quick-fix:

in "ackphysx.h" there is an event "physX_ent_remove", which is called, when an entity is removed via ptr_remove. In that function, the DLL function pXent_settype is used to release the entity from the PhysX system. If you replace that call with

Code:
pXent_enable(ent, 0);



the entity is released from PhysX and the engine, all shapes are removed and the remaining PhysX system is stable.

So just replace the function in ackphysx.h with this one and it'll work:

Code:
function physX_ent_remove(ENTITY* ent)
{
    if (!NxPhysicsSDK)
        return;
        
    if (ent.body != NULL)
        pXent_enable(ent, 0);
        
    on_ent_remove_px(ent);
}



I am not 100% sure why this happens, but it works great for me: in the following pic you see a complex PhysX-setup in the engine and in the NVidia PhysX Visual Debugger:



When I remove all entities with ptr_remove and the above fix, the vehicle is removed correctly:



Without the fix, the entities are removed as well, but the shapes stay in place and all tree-trunks are flying into the sky.

Last edited by HeelX; 09/03/12 08:37.