cocos_add_wheel_joint2d
Add a wheel joint to simulate vehicle physics in Cocos Creator by combining sliding, spring, and motor functionality for realistic movement.
Instructions
Attach cc.WheelJoint2D — wheel + axle (slide along axis + spring + motor combined; vehicles).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"scene_path": "<scene_path>",
"node_id": "<node_id>"
},
"name": "cocos_add_wheel_joint2d"
}
}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 | ||
| angle | No | ||
| enable_motor | No | ||
| motor_speed | No | ||
| max_motor_torque | No | ||
| frequency | No | ||
| damping_ratio | No | ||
| collide_connected | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |