Skip to main content

simulate_physics

Auto-generated from the Python tool registry. Do not hand-edit outside <!-- examples:start --><!-- examples:end --> blocks — the generator (tools/generate_docs_reference.py) will overwrite them.

Group: physics  ·  Module: services.registry.capability_adapter

Maturity: stable (support status; independent of enabled state, readiness and permissions).

Description​

Advance physics by a bounded number of explicit simulation steps.

Parameters​

NameTypeRequiredDescription
actionLiteral['simulate_step']yesFeature action to perform.
dimensionstr | None—Physics dimension: '3d' (default) or '2d'.
targetstr | None—Target GameObject name or instance ID.
search_methodstr | None—Search method for target resolution.
stepsint | None—Number of simulation steps (max 100).
step_sizefloat | None—Step size in seconds.
unity_instancestr | int | None—Target Unity instance for this call: Name@hash or hash prefix; an integer selects only that exact port over stdio and is rejected over HTTP. Read mcpforunity://instances for available targets. Omit to use the legacy active selection or the sole available instance.

Returns​

A dict containing the Unity response. The exact shape depends on the action.

Examples​

Advance 3D physics by one 20-millisecond step in a disposable test scene and read back the test crate's Rigidbody state. target limits the reported bodies. The simulation itself advances the physics scene.

MCP arguments
{
"action": "simulate_step",
"dimension": "3d",
"target": "Test Crate",
"search_method": "by_name",
"steps": 1,
"step_size": 0.02
}