PxCreateCooking problem

Hello, I’m trying to create cooking, I’m doing that like physX documentation says:

mCooking = PxCreateCooking(PX_PHYSICS_VERSION, *mFoundation, PxCookingParams());

but In VS2012 i’m reciving following error:

Error	29	error C2512: 'physx::PxCookingParams::PxCookingParams' : no appropriate default constructor available	C:\Users\Lukasz\Dropbox\directx\RaptorEngine\physicsclass.cpp	55

Hi,

first you really should read the PhysX Guide.
After that, look into the Snippets and then into the Samples to understand how PhysX works.
[I hope you are not a newbie into C++ coding, because it seems to me…]

Please read the error message, it already says everything to solve this issue.

A hint: PxCookingParams doesnt have a default constructor.
You must give them valid parameters like this:

//IMPORTANT:
PxInitExtensions(*mSDK); //Init the Extensions like cooking where mSDK is a pointer to PxCreatePhysics

PxTolerancesScale toleranceScale;
toleranceScale.mass = 1000;
toleranceScale.speed = sceneDesc.gravity.y;
bool value = toleranceScale.isValid(); // make sure this value is always true

mCooking = PxCreateCooking(PX_PHYSICS_VERSION,*mFoundation,PxCookingParams(toleranceScale));

Thanks, works great.