---
title: "physics.softBody.set: Soft Body Settings — Scene kit command — Kition"
description: "Changes soft-body settings and partial `effectorWeights` on `objects`. Weights default to 1 and range from -200 to 200; other systems are unaffected."
canonical: "https://developer.kition.ai/docs/kits/scene/commands/physics.softBody.set"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/scene/commands/physics.softBody.set](https://developer.kition.ai/docs/kits/scene/commands/physics.softBody.set)

# physics.softBody.set

**Soft Body Settings.** Changes soft-body settings and partial `effectorWeights` on `objects`. Weights default to 1 and range from -200 to 200; other systems are unaffected.

- Kit: Scene 0.1.0 (.kscene); reference: [Scene kit commands](https://developer.kition.ai/docs/kits/scene.md)
- Changes the document: yes
- Acts on: `objects` (a list of ids), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ballSize` | `number` | no | Self collision: each vertex's ball as a share of its edges' mean length (0.49) |
| `bending` | `number` | no | Springs between vertices two edges apart, 0 to 10 (0: none) |
| `damping` | `number` | no | Edge damping (0.5) |
| `edges` | `boolean` | no | Springs along the mesh's edges (on) |
| `effectorWeights` | `object` | no | Partial cloth or soft-body influence weights; All multiplies field weights, Gravity is independent |
| `frameEnd` | `integer` | no | The last simulated frame (250); after it the body holds |
| `frameStart` | `integer` | no | The first simulated frame (1); before it the mesh is at rest |
| `friction` | `number` | no | Air friction (0.5) |
| `goal` | `boolean` | no | Vertices are drawn to where the mesh puts them (on) |
| `goalDamping` | `number` | no | Goal spring damping (0) |
| `goalDefault` | `number` | no | The goal weight, 0 to 1; 1 follows the mesh exactly (0.7) |
| `goalGroup` | `string` | no | The vertex group whose weights scale the goal (empty: every vertex alike) |
| `goalMax` | `number` | no | The goal weight at group weight 1, 0 to 1 (1) |
| `goalMin` | `number` | no | The goal weight at group weight 0, 0 to 1 (0) |
| `goalStiffness` | `number` | no | Goal spring stiffness, 0 to 0.999 (0.5) |
| `mass` | `number` | no | Mass of each vertex in kg (1) |
| `objects` | `integer \| string \| (integer \| string)[]` | no | The objects; the selection when left out |
| `pick` | `number[]` | no | Instead of `object`/`objects`: a world point [x, y, z] in metres; the command acts on the object there now (the smallest whose mesh's bounds hold the point, else the nearest light, camera, empty, curve, text, lattice or armature whose origin is within 0.25 m). A place: with `basis`, a write by it is refused when what is at the point is no longer what was there (moved away, another moved in, its parent moved) |
| `pull` | `number` | no | Edge stiffness when stretched, 0 to 0.999 (0.5) |
| `push` | `number` | no | Edge stiffness when squeezed, 0 to 0.999 (0.5) |
| `selfCollision` | `boolean` | no | Vertices keep apart from each other (off) |
| `speed` | `number` | no | How fast simulated time runs (1) |

## Call through scene_run

```text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "physics.softBody.set" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `ballSize`, `bending`, `damping`, `edges`, `effectorWeights`, `frameEnd`, `frameStart`, `friction`, `goal`, `goalDamping`, `goalDefault`, `goalGroup`, `goalMax`, `goalMin`, `goalStiffness`, `mass`, `objects`, `pick`, `pull`, `push`, `selfCollision`, `speed`. scene_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "ballSize": {
      "description": "Self collision: each vertex's ball as a share of its edges' mean length (0.49)",
      "type": "number"
    },
    "bending": {
      "description": "Springs between vertices two edges apart, 0 to 10 (0: none)",
      "type": "number"
    },
    "damping": {
      "description": "Edge damping (0.5)",
      "type": "number"
    },
    "edges": {
      "description": "Springs along the mesh's edges (on)",
      "type": "boolean"
    },
    "effectorWeights": {
      "additionalProperties": false,
      "description": "Partial cloth or soft-body influence weights; All multiplies field weights, Gravity is independent",
      "properties": {
        "all": {
          "description": "All field weights multiplier, -200 to 200 (1); does not affect gravity",
          "type": "number"
        },
        "drag": {
          "description": "Drag weight, -200 to 200 (1)",
          "type": "number"
        },
        "force": {
          "description": "Force weight, -200 to 200 (1)",
          "type": "number"
        },
        "gravity": {
          "description": "Signed gravity multiplier, -200 to 200 (1), independent of All",
          "type": "number"
        },
        "turbulence": {
          "description": "Turbulence weight, -200 to 200 (1)",
          "type": "number"
        },
        "vortex": {
          "description": "Vortex weight, -200 to 200 (1)",
          "type": "number"
        },
        "wind": {
          "description": "Wind weight, -200 to 200 (1)",
          "type": "number"
        }
      },
      "type": "object"
    },
    "frameEnd": {
      "description": "The last simulated frame (250); after it the body holds",
      "type": "integer"
    },
    "frameStart": {
      "description": "The first simulated frame (1); before it the mesh is at rest",
      "type": "integer"
    },
    "friction": {
      "description": "Air friction (0.5)",
      "type": "number"
    },
    "goal": {
      "description": "Vertices are drawn to where the mesh puts them (on)",
      "type": "boolean"
    },
    "goalDamping": {
      "description": "Goal spring damping (0)",
      "type": "number"
    },
    "goalDefault": {
      "description": "The goal weight, 0 to 1; 1 follows the mesh exactly (0.7)",
      "type": "number"
    },
    "goalGroup": {
      "description": "The vertex group whose weights scale the goal (empty: every vertex alike)",
      "type": "string"
    },
    "goalMax": {
      "description": "The goal weight at group weight 1, 0 to 1 (1)",
      "type": "number"
    },
    "goalMin": {
      "description": "The goal weight at group weight 0, 0 to 1 (0)",
      "type": "number"
    },
    "goalStiffness": {
      "description": "Goal spring stiffness, 0 to 0.999 (0.5)",
      "type": "number"
    },
    "mass": {
      "description": "Mass of each vertex in kg (1)",
      "type": "number"
    },
    "objects": {
      "description": "The objects; the selection when left out",
      "oneOf": [
        {
          "description": "an object's id",
          "type": "integer"
        },
        {
          "description": "an object's name",
          "type": "string"
        },
        {
          "description": "ids or names",
          "items": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          },
          "type": "array"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Object"
      ]
    },
    "pick": {
      "description": "Instead of `object`/`objects`: a world point [x, y, z] in metres; the command acts on the object there now (the smallest whose mesh's bounds hold the point, else the nearest light, camera, empty, curve, text, lattice or armature whose origin is within 0.25 m). A place: with `basis`, a write by it is refused when what is at the point is no longer what was there (moved away, another moved in, its parent moved)",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "pull": {
      "description": "Edge stiffness when stretched, 0 to 0.999 (0.5)",
      "type": "number"
    },
    "push": {
      "description": "Edge stiffness when squeezed, 0 to 0.999 (0.5)",
      "type": "number"
    },
    "selfCollision": {
      "description": "Vertices keep apart from each other (off)",
      "type": "boolean"
    },
    "speed": {
      "description": "How fast simulated time runs (1)",
      "type": "number"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/scene-darwin-arm64@0.1.0 and the kit itself (scene_commands through @kition/cli@0.1.1, built from KitionAI/kition-scene@4d06faf).
