Originally Posted By: 3dgs_snake
Hi,

You can grab a new version of the dll (I fixed some minor bugs).

Quote:
I can implement the cloth simulation, but I need your ackphysX3CHECKED.dll source code, pm me if you are interested?

Thanks rojart, I will contact you when the plugin is more stable ...


Thanks it would be really useful, I played a bit with sdk 3.2.1 and got to work also, but only the SDK works for me now.

Here is my converted CreateCube definition code, here i missed something that the code don't Transforms the PhysX Object like the Engine Entity?

Code:
void PhysX3::CreateCube(ENTITY * ent, const PxVec3& pos, int body, PxVec3& TempScale)
{
	PX_ASSERT(0 != gScene);

	PxVec3 vec_min,vec_max;
	GetMinMax(ent,vec_min,vec_max);

	PxMaterial* mMaterial = gPhysicsSDK->createMaterial(1.0,1.0,1.0);
	
	// Setting up the Dimensions
	PxVec3 dimensions = (vec_max-vec_min)/2;
	dimensions.x *= TempScale.x;
	dimensions.y *= TempScale.y;
	dimensions.z *= TempScale.z;
	PxBoxGeometry geometry(dimensions);

	PxReal density = 1.0f;
	PxTransform transform(PxVec3(pos.x, pos.y, pos.z)* PXSize, PxQuat::createIdentity());

	PxRigidDynamic *actor = PxCreateDynamic(*gPhysicsSDK, transform, geometry, *mMaterial, density);
	actor->setAngularDamping(0.75);
	actor->setLinearVelocity(PxVec3(0,0,0));
	if (!actor)
		error("create actor failed!");

	box = actor;

	// Save the entity's index to the userData of the shape
	box->userData = (long*)ent->link.index;

	mPhysicsActors.push_back(box);

	PxU32 nShapes = box->getNbShapes();
	
	PxShape** shapes = new PxShape*[nShapes];

	box->getShapes(shapes, nShapes);
	
	PxTransform pT = transform;
	pT.p  = PXSize * pos;
	PxBoxGeometry bg = geometry;

	PxMat33 pose = PxMat33(pT.q );
	float mat[16];
	getColumnMajor(pose,pT.p, mat);
	ang_to_matrix((ANGLE*)&(ent->pan),&(mat[0]));

	box->setDominanceGroup(1);
	PX_ASSERT(box->isValid());
	gScene->addActor(*box);
}



Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P