---
title: "physics.world.set: Physics World — Scene kit command — Kition"
description: "Sets the physics world: gravity, frame range, steps and iterations."
canonical: "https://developer.kition.ai/docs/kits/scene/commands/physics.world.set"
---

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

# physics.world.set

**Physics World.** Sets the physics world: gravity, frame range, steps and iterations.

- Kit: Scene 0.1.0 (.kscene); reference: [Scene kit commands](https://developer.kition.ai/docs/kits/scene.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `frameEnd` | `integer` | no | The last simulated frame |
| `frameStart` | `integer` | no | The first simulated frame |
| `gravity` | `number[]` | no | Gravity in m/s² (default 0, 0, -9.81) [x, y, z] |
| `iterations` | `integer` | no | Solver iterations per step (1 to 100) |
| `substeps` | `integer` | no | Simulation steps per frame (1 to 100) |
| `timeScale` | `number` | no | How fast simulated time runs (0.01 to 100) |

## Call through scene_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `frameEnd`, `frameStart`, `gravity`, `iterations`, `substeps`, `timeScale`. 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": {
    "frameEnd": {
      "description": "The last simulated frame",
      "type": "integer"
    },
    "frameStart": {
      "description": "The first simulated frame",
      "type": "integer"
    },
    "gravity": {
      "description": "Gravity in m/s² (default 0, 0, -9.81) [x, y, z]",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "iterations": {
      "description": "Solver iterations per step (1 to 100)",
      "type": "integer"
    },
    "substeps": {
      "description": "Simulation steps per frame (1 to 100)",
      "type": "integer"
    },
    "timeScale": {
      "description": "How fast simulated time runs (0.01 to 100)",
      "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).
