cocos_add_polygon_collider2d
Add polygon-shaped collision detection to game objects in Cocos Creator for physics interactions, using vertex coordinates to define custom shapes.
Instructions
Attach cc.PolygonCollider2D. points is [[x,y],...] vertex list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| points | No | ||
| density | No | ||
| friction | No | ||
| restitution | No | ||
| is_sensor | No | ||
| tag | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |