cocos_set_physics_3d_config
Configure 3D physics parameters including gravity, timestep, and sub-step settings to optimize physics simulation performance in Cocos Creator projects.
Instructions
Configure 3D physics: gravity (m/s²), timestep, sub-step cap.
Default gravity is (0, -10, 0) in metric units (NOT pixels — 2D uses -320 because of its pixel coord system). Writes settings/v2/packages/physics.json. Bump max_sub_steps to 3-4 if physics drops frames after hitches.
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_3d_config"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| gravity_x | No | ||
| gravity_y | No | ||
| gravity_z | No | ||
| fixed_time_step | No | ||
| max_sub_steps | No | ||
| sleep_threshold | No | ||
| allow_sleep | No | ||
| auto_simulation | No |