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.
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 |