Skip to content

WheelJoint2D ​

Physics 2DScripts: WheelJoint2DComponentFeature: 2D Physics (≈45 KB)

Optional feature

WheelJoint2D is part of 2D Physics. A build includes it only when a scene, prefab or script uses it — see Feature cropping.

From a script ​

ts
import { WheelJoint2DComponent } from "mmpx";

const wheelJoint2D = this.entity.TryGetComponent(WheelJoint2DComponent);

Full API: WheelJoint2DComponent.

Fields ​

FieldTypeDefaultDescription
Connected Body
connectedBody
Rigidbody2D—The other Rigidbody2D — empty ties it to the world
Enable Collision
enableCollision
booleanfalseWhether the two connected bodies still collide with each other
Anchor X
anchorX
number0
Anchor Y
anchorY
number0
Auto Connected Anchor
autoConfigureConnectedAnchor
booleantruePuts the connected anchor where this anchor is when the joint is created
Connected Anchor X
connectedAnchorX
number0
Connected Anchor Y
connectedAnchorY
number0
Use Motor
useMotor
booleanfalse

Breaking ​

FieldTypeDefaultDescription
Break Force
breakForce
number (0 … ∞)0Breaks when pulled harder than this (kg·px/s²) — 0 = never
Break Torque
breakTorque
number (0 … ∞)0Breaks when twisted harder than this (kg·px²/s²) — 0 = never

Suspension ​

FieldTypeDefaultDescription
Angle
angle
number (°)90°Suspension direction in the connected body's frame (90° = up)
Frequency
frequency
number (0.01 … ∞) (Hz)4Suspension stiffness
Damping Ratio
dampingRatio
number (0 … 1)0.7

Motor ​

FieldTypeDefaultDescription
Speed
motorSpeed
number (°)0°
Max Torque
maxMotorTorque
number (0 … ∞)1000000kg·px²/s²

© 2026 PlayAdGentic