cocos_add_spring_joint2d
Add a spring joint to 2D physics objects in Cocos Creator for simulating flexible connections like suspensions and ropes.
Instructions
Attach cc.SpringJoint2D — soft springy distance (suspensions, ropes).
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 |