Skip to content

TargetJoint2D ​

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

Optional feature

TargetJoint2D 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 { TargetJoint2DComponent } from "mmpx";

const targetJoint2D = this.entity.TryGetComponent(TargetJoint2DComponent);

Full API: TargetJoint2DComponent.

Fields ​

FieldTypeDefaultDescription
Anchor X
anchorX
number0
Anchor Y
anchorY
number0
Auto Target
autoConfigureTarget
booleantrueStarts the target on the anchor (so nothing moves until the target does)
Target X
targetX
number0World position
Target Y
targetY
number0
Max Force
maxForce
number (0 … ∞)100000kg·px/s²
Frequency
frequency
number (0.01 … ∞) (Hz)5How stiffly it follows
Damping Ratio
dampingRatio
number (0 … 1)1

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

© 2026 PlayAdGentic