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).
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 |