cocos_set_physics_2d_config
Configure 2D physics parameters like gravity, timestep, and solver iterations for Cocos Creator projects to control physics simulation behavior.
Instructions
Configure 2D physics: gravity, timestep, solver iterations.
Default gravity is (0, -320). Must call this before build if using physics.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_path": "<project_path>"
},
"name": "cocos_set_physics_2d_config"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| gravity_x | No | ||
| gravity_y | No | ||
| fixed_time_step | No | ||
| velocity_iterations | No | ||
| position_iterations | No | ||
| allow_sleep | No |