Cloth
Collision Layers
Cloth participates in the normal rigid-body layer matrix.
Cloth participates in the normal rigid-body layer matrix.
cloth.set_layer(cloth_layer);
var layer_handle = cloth.get_layer();Use a valid JoltLayer or its handle. get_layer() returns the native handle. Keep the original layer wrapper for its managed methods. Contacts work with static, dynamic and kinematic rigid bodies when layers permit them.
Cloth-vs-Cloth and self-collision are not supported by this integration. A soft body is not a JoltBody: do not pass it to rigid-only APIs. Soft Body Carry uses its dedicated integration and set_grab_enabled(true).
New related workflows#
Verified operation contracts#
These contracts distinguish units, return values, errors and lifetime according to the current implementation. Check results: false, 0 and undefined can mean different things for different methods.
| Symbol / owner | Signature | Operation contract |
|---|---|---|
| JoltBBMODCloth.get_layer | JoltBBMODCloth.get_layer() | Numeric layer handle; 0 for an invalid wrapper, not a JoltLayer. |
| JoltBBMODCloth.set_layer | JoltBBMODCloth.set_layer(layer) | JoltLayer or numeric handle of an existing layer in this world; Boolean. |