Skip to main content

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​

NameTypeRequiredDescription
actionLiteral['apply_force']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.
positionlist[float] | None—Overlap position [x,y,z] or [x,y].
forcelist[float] | None—Force vector [x,y,z] or [x,y] for apply_force.
force_modestr | None—Force mode: Force, Impulse, Acceleration, VelocityChange (3D); Force, Impulse (2D).
force_typestr | None—Force type: 'normal' (default) or 'explosion' (3D only).
torquelist[float] | None—Torque vector [x,y,z] (3D) or [z] (2D).
explosion_positionlist[float] | None—Explosion center [x,y,z].
explosion_radiusfloat | None—Explosion radius.
explosion_forcefloat | None—Explosion force magnitude.
upwards_modifierfloat | None—Explosion upwards modifier.
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​

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
]
}