cocos_add_distance_joint2d
Attach a distance joint to maintain a fixed separation between two physics bodies in Cocos Creator scenes.
Instructions
Attach cc.DistanceJoint2D — keeps two bodies a fixed distance apart.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| connected_body_id | No | ||
| anchor_x | No | ||
| anchor_y | No | ||
| connected_anchor_x | No | ||
| connected_anchor_y | No | ||
| distance | No | ||
| auto_calc_distance | No | ||
| frequency | No | ||
| damping_ratio | No | ||
| collide_connected | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |