‹
Current project

Carrying Soft Bodies

Opt-in defaults off; radius defaults 0.15 m, accepts 0.001..10 m and changes only after release. Use the existing Carry profile, not legacy grabber. Selection raycasts deformed physics triangles, respects obstacles/layers and total Soft Body mass, then holds a fixed connected surface neighborhood. Nearby opposite layers are not grabbed through space.

Example#

GML
soft.set_grab_enabled(true);
soft.set_grab_radius(0.15);
// Existing carry.update_controls() remains unchanged.
var type = carry.get_held_type();
var held_soft = carry.get_soft_body();
var count = carry.get_grab_vertex_count();

Usage and limits#

Forces move the selected region. Rotation needs at least three suitable non-collinear free vertices. Pins and attachments remain; pinning a held vertex releases capture. Throw adds velocity to the region with the existing speed cap, not one rigid velocity to the entire mesh. Only one grabber holds a Soft Body at once.

get_held_type returns none/body/soft_body. get_body returns undefined for soft objects; use get_soft_body. Holding subdivides the world step to at most 1/240 s, or 1/480 s with dynamic attachments, capped at 64 segments. Detailed visuals are not separate hit surfaces. Disabling grab or destroying the object safely releases.

API reference#

Public function and method signatures. Call methods on the returned instance; parameters with defaults are optional.

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 / ownerSignatureOperation contract
JoltBBMODBox.get_grab_enabledJoltBBMODBox.get_grab_enabled()Boolean native setting; also false for an invalid object.
JoltBBMODBox.get_grab_radiusJoltBBMODBox.get_grab_radius()Selection radius in metres; undefined for an invalid wrapper. Inspect native errors separately. Default radius 0.15 m.
JoltBBMODBox.set_grab_enabledJoltBBMODBox.set_grab_enabled(enabled)Boolean or 0/1; returns Boolean success. Controls soft-body Grabber eligibility, not climbing Grip. Default false.
JoltBBMODBox.set_grab_radiusJoltBBMODBox.set_grab_radius(radius)Finite radius 0.001..10 m; Boolean. Defines local particle selection when grabbing; release the held object before changing it. Default radius 0.15 m.
JoltBBMODCloth.get_grab_enabledJoltBBMODCloth.get_grab_enabled()Boolean native setting; also false for an invalid object.
JoltBBMODCloth.get_grab_radiusJoltBBMODCloth.get_grab_radius()Selection radius in metres; undefined for an invalid wrapper. Inspect native errors separately. Default radius 0.15 m.
JoltBBMODCloth.set_grab_enabledJoltBBMODCloth.set_grab_enabled(enabled)Boolean or 0/1; returns Boolean success. Controls soft-body Grabber eligibility, not climbing Grip. Default false.
JoltBBMODCloth.set_grab_radiusJoltBBMODCloth.set_grab_radius(radius)Finite radius 0.001..10 m; Boolean. Defines local particle selection when grabbing; release the held object before changing it. Default radius 0.15 m.
JoltBBMODModel.get_grab_enabledJoltBBMODModel.get_grab_enabled()Boolean native setting; also false for an invalid object.
JoltBBMODModel.get_grab_radiusJoltBBMODModel.get_grab_radius()Selection radius in metres; undefined for an invalid wrapper. Inspect native errors separately. Default radius 0.15 m.
JoltBBMODModel.set_grab_enabledJoltBBMODModel.set_grab_enabled(enabled)Boolean or 0/1; returns Boolean success. Controls soft-body Grabber eligibility, not climbing Grip. Default false.
JoltBBMODModel.set_grab_radiusJoltBBMODModel.set_grab_radius(radius)Finite radius 0.001..10 m; Boolean. Defines local particle selection when grabbing; release the held object before changing it. Default radius 0.15 m.
JoltBBMODSoftBody.get_grab_enabledJoltBBMODSoftBody.get_grab_enabled()Boolean native setting; also false for an invalid object.
JoltBBMODSoftBody.get_grab_radiusJoltBBMODSoftBody.get_grab_radius()Selection radius in metres; undefined for an invalid wrapper. Inspect native errors separately. Default radius 0.15 m.
JoltBBMODSoftBody.set_grab_enabledJoltBBMODSoftBody.set_grab_enabled(enabled)Boolean or 0/1; returns Boolean success. Controls soft-body Grabber eligibility, not climbing Grip. Default false.
JoltBBMODSoftBody.set_grab_radiusJoltBBMODSoftBody.set_grab_radius(radius)Finite radius 0.001..10 m; Boolean. Defines local particle selection when grabbing; release the held object before changing it. Default radius 0.15 m.
JoltBBMODSphere.get_grab_enabledJoltBBMODSphere.get_grab_enabled()Boolean native setting; also false for an invalid object.
JoltBBMODSphere.get_grab_radiusJoltBBMODSphere.get_grab_radius()Selection radius in metres; undefined for an invalid wrapper. Inspect native errors separately. Default radius 0.15 m.
JoltBBMODSphere.set_grab_enabledJoltBBMODSphere.set_grab_enabled(enabled)Boolean or 0/1; returns Boolean success. Controls soft-body Grabber eligibility, not climbing Grip. Default false.
JoltBBMODSphere.set_grab_radiusJoltBBMODSphere.set_grab_radius(radius)Finite radius 0.001..10 m; Boolean. Defines local particle selection when grabbing; release the held object before changing it. Default radius 0.15 m.