Scene kit command

physics.world.set

Physics World

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

Kit
Scene 0.1.0 (.kscene)
Changes the document
yes

Parameters

Parameters of physics.world.set
NameTypeRequiredDescription
frameEndintegernoThe last simulated frame
frameStartintegernoThe first simulated frame
gravitynumber[]noGravity in m/s² (default 0, 0, -9.81) [x, y, z]
iterationsintegernoSolver iterations per step (1 to 100)
substepsintegernoSimulation steps per frame (1 to 100)
timeScalenumbernoHow 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/[email protected] and the kit itself (scene_commands through @kition/[email protected], built from KitionAI/kition-scene@4d06faf). As data: commands.jsonl.