cocos_add_mouse_joint2d
Add a mouse joint to physics bodies in Cocos Creator scenes, enabling interactive drag-and-drop functionality for game objects.
Instructions
Attach cc.MouseJoint2D — drag-to-target constraint, used to pick up bodies with the mouse.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| max_force | No | ||
| frequency | No | ||
| damping_ratio | No | ||
| target_x | No | ||
| target_y | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |