NVIDIAGameWorks / FleX

Other
668 stars 100 forks source link

Update signed distance fields collisions #134

Open ZAMA30 opened 1 year ago

ZAMA30 commented 1 year ago

After I change float densitys of a NvFlexBuffer :

std::memcpy( g_buffers->colliders.mappedPtr, g_Updates.sdfdatas[0]->colldata, sizeof(float) dimdim*dim);

NvFlexUpdateDistanceField(g_flexLib, g_Updates.sdfdatas[0]->sdf[0], dim, dim, dim, g_buffers->colliders.buffer);

Also i call NvSetShapes()...

...But the collision shape is not updated, it collides as the first shape.

Is there any way to update this data ??

Thank you