   PhysX checking if a file exits or a function worked.
  Hi guys, i thought i had a function to attempt to load a file and if it didn't work then a mesh would be cooked for loading into PhysX, if it did work then load the precooked mesh.This is what i tried:FILE* fil = fopen(pfilename, "rb");if (fil){fclose(fil);ShapeDesc.meshData = gPhysicsSDK->createTriangleMesh(UserStream(pfilename, true));}else{bool status = NxCookTriangleMesh(TriMeshDesc, UserStream(pfilename, false));}It breaks if the file isn't built, but for some reason it builds it anyway. So it works the second time you run the app.Any better ideas on how to load like this?Any and all help appreciated.JamesCobras   