cocos_add_mesh_collider_3d
Add mesh-based collision detection to 3D objects in Cocos Creator scenes, enabling physics interactions for dynamic or static bodies with configurable convex/concave mesh settings.
Instructions
Attach cc.MeshCollider.
IMPORTANT: convex=True is required when the rigid body is DYNAMIC
ā physics backends (PhysX/Bullet) only support convex meshes on
non-static bodies. For static ground geometry, triangle (concave)
meshes are fine with convex=False.
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_mesh_collider_3d"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| mesh_uuid | No | ||
| convex | No | ||
| center_x | No | ||
| center_y | No | ||
| center_z | No | ||
| is_trigger | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |