runtime
13 public commands in this category.
apply_force
Apply a force or impulse to an entity during Play mode
Scope:
scene:write. Token cost: 0.- entityId string (required)
- Entity ID to apply force to
- force array (optional)
- Force vector [x, y, z]
- impulse array (optional)
- Impulse vector [x, y, z] (instant)
- torque array (optional)
- Torque vector [x, y, z]
get_mode
Get current engine mode (edit, play, or paused)
Scope:
scene:read. Token cost: 0.pause
Pause play mode — freezes simulation
Scope:
scene:write. Token cost: 0.play
Enter play mode — starts game simulation, snapshots scene state
Scope:
scene:write. Token cost: 0.raycast_query
Cast a ray from origin in direction and return the first entity hit. Results arrive asynchronously via RAYCAST_RESULT event.
Scope:
scene:read. Token cost: 0.- direction array (required)
- Ray direction [x, y, z] (normalized)
- origin array (required)
- Ray origin [x, y, z]
- maxDistance number (optional)
- Maximum ray distance (default 100)
- requestId string (optional)
- Optional request ID for tracking (auto-generated if omitted)
remove_input_binding
Remove an input action binding by name
Scope:
scene:write. Token cost: 0.- actionName string (required)
- Name of the action to remove
- player integer (optional)
- Local-player slot (0 = primary player, the default). Set 1 for a second local player's independent action map; omit for single-player.
replay_input_trace
Replay a bounded input trace through the RUNNING engine and report what it observed: whether the player entity moved and, for a recorded trace, whether exactly one collectible was collected. A strategy run asserts movement only (the bot's plan does not aim for a collectible) and reports collectiblesCollected without asserting it. The engine clock is pinned for the whole run so the result is deterministic. Provide exactly one of trace (a recorded input trace from the Playtest panel, max 120 ticks / 30 s) or strategy (an AI gameplay-bot strategy, planned and converted into a trace). Requires Play mode. The verdict is a runtime outcome, never a heuristic rating.
Scope:
scene:write. Token cost: 0.- playerEntityId string (required)
- Entity whose displacement proves input reached the runtime
- collectibleEntityIds array (optional)
- Collectibles expected to be collected. Defaults to every entity carrying a collectible component.
- strategy string (optional)
- AI gameplay-bot strategy to plan and replay instead of a recorded trace
- trace object (optional)
- A recorded input trace: { version: 1, fixtureId, actionNames, durationMs, frames: [{ tick, actions: { <name>: { pressed, axis? } } }] }
resume
Resume play mode from paused state
Scope:
scene:write. Token cost: 0.set_input_binding
Create or update an input action binding (e.g. map 'jump' to Space key)
Scope:
scene:write. Token cost: 0.- actionName string (required)
- Name of the input action (e.g. 'jump', 'move_forward')
- actionType string (required)
- digital = on/off, axis = -1..+1
- deadZone number (optional)
- Dead zone for axis (default 0.1)
- negativeKeys array (optional)
- Negative direction keys for axis actions
- player integer (optional)
- Local-player slot (0 = primary player, the default). Set 1 for a second local player's independent action map; omit for single-player.
- positiveKeys array (optional)
- Positive direction keys for axis actions
- sources array (optional)
- Key codes for digital actions (e.g. ['Space', 'KeyW'])
set_input_preset
Merge a built-in input preset into a player's bindings (additive; the preset's own actions win on name collisions)
Scope:
scene:write. Token cost: 0.- preset string (required)
- Preset name
- player integer (optional)
- Local-player slot (0 = primary player, the default). Set 1 for a second local player's independent action map; omit for single-player.
stop
Stop play mode — restores scene to pre-play state
Scope:
scene:write. Token cost: 0.toggle_physics
Enable or disable physics simulation on an entity
Scope:
scene:write. Token cost: 0.- enabled boolean (required)
- true to enable, false to disable
- entityId string (required)
- Entity ID
update_physics
Set physics properties on an entity (body type, collider, restitution, friction, density, gravity, locked axes)
Scope:
scene:write. Token cost: 0.- entityId string (required)
- Entity ID to configure
- bodyType string (optional)
- Rigid body type
- colliderShape string (optional)
- Collider shape
- density number (optional)
- Mass density
- friction number (optional)
- Surface friction (0-1)
- gravityScale number (optional)
- Gravity multiplier (-10 to 10)
- isSensor boolean (optional)
- If true, detects overlap without blocking
- lockRotationX boolean (optional)
- lockRotationY boolean (optional)
- lockRotationZ boolean (optional)
- lockTranslationX boolean (optional)
- lockTranslationY boolean (optional)
- lockTranslationZ boolean (optional)
- restitution number (optional)
- Bounciness (0-1)