apply_physics_force
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
Apply forces, torque or explosions to rigidbodies.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | Literal['apply_force'] | yes | Feature action to perform. |
dimension | str | None | — | Physics dimension: '3d' (default) or '2d'. |
target | str | None | — | Target GameObject name or instance ID. |
search_method | str | None | — | Search method for target resolution. |
position | list[float] | None | — | Overlap position [x,y,z] or [x,y]. |
force | list[float] | None | — | Force vector [x,y,z] or [x,y] for apply_force. |
force_mode | str | None | — | Force mode: Force, Impulse, Acceleration, VelocityChange (3D); Force, Impulse (2D). |
force_type | str | None | — | Force type: 'normal' (default) or 'explosion' (3D only). |
torque | list[float] | None | — | Torque vector [x,y,z] (3D) or [z] (2D). |
explosion_position | list[float] | None | — | Explosion center [x,y,z]. |
explosion_radius | float | None | — | Explosion radius. |
explosion_force | float | None | — | Explosion force magnitude. |
upwards_modifier | float | None | — | Explosion upwards modifier. |
unity_instance | str | 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
Apply an upward impulse to a test crate with a dynamic 3D Rigidbody in Play Mode. Replace Test Crate with the exact object you want to move, and inspect its subsequent simulation state.
MCP arguments
{
"action": "apply_force",
"dimension": "3d",
"target": "Test Crate",
"search_method": "by_name",
"force_mode": "Impulse",
"force": [
0,
2,
0
]
}