cocos_add_camera
Attach a camera to a node in Cocos Creator for minimap or split-screen functionality. Configure projection type (orthographic or perspective) and camera properties to control scene rendering.
Instructions
Attach cc.Camera. projection: 0=ORTHO, 1=PERSPECTIVE. For minimap/split-screen.
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": {
"scene_path": "<scene_path>",
"node_id": "<node_id>"
},
"name": "cocos_add_camera"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| projection | No | ||
| priority | No | ||
| ortho_height | No | ||
| fov | No | ||
| clear_color_r | No | ||
| clear_color_g | No | ||
| clear_color_b | No | ||
| clear_color_a | No | ||
| visibility | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |