[PhysX 3.3.2] PxCloth, How add a spring between two particles ?

Hello,

I would like to know if it is possible to create a spring between two PxClothParticle of the same cloth or two different cloths. I would also like to know if we can add a force to a cloth particle.

Thank you !

Unfortunately, as for as I know, it’s impossible to do this by pure PhysX API. Try use PBD constraint instead.

See the API docs, look for:
virtual void PxCloth::setParticleAccelerations ( const PxVec4 * particleAccelerations ) [pure virtual]

Updates particle accelerations, w component is ignored.

Parameters:
[in] particleAccelerations New particle accelerations.

Note:
The particleAccelerations must either be null to disable accelerations, or be the same length as the number of particles, see getNbParticles().