Skip to content

Class: DistanceJoint2DComponent ​

Keeps the anchors a fixed distance apart (a rod), or at most that far (a rope).

Extends ​

Constructors ​

Constructor ​

ts
new DistanceJoint2DComponent(): DistanceJoint2DComponent;

Returns ​

DistanceJoint2DComponent

Inherited from ​

Joint2DComponent.constructor

Properties ​

PropertyModifierTypeDefault valueInherited from
anchorXpublicnumberundefinedJoint2DComponent.anchorX
anchorYpublicnumberundefinedJoint2DComponent.anchorY
autoConfigureConnectedAnchorpublicbooleanundefinedJoint2DComponent.autoConfigureConnectedAnchor
autoConfigureDistancepublicbooleanundefined-
breakForcepublicnumberundefinedJoint2DComponent.breakForce
breakTorquepublicnumberundefinedJoint2DComponent.breakTorque
connectedAnchorXpublicnumberundefinedJoint2DComponent.connectedAnchorX
connectedAnchorYpublicnumberundefinedJoint2DComponent.connectedAnchorY
connectedBodypublicRigidbody2DComponent | nullundefinedJoint2DComponent.connectedBody
dirtypublicbooleantrueJoint2DComponent.dirty
distancepublicnumberundefined-
enableCollisionpublicbooleanundefinedJoint2DComponent.enableCollision
enabledpublicbooleantrueJoint2DComponent.enabled
maxDistanceOnlypublicbooleanundefined-

Accessors ​

isSimulated ​

Get Signature ​

ts
get isSimulated(): boolean;
Returns ​

boolean

Inherited from ​

Joint2DComponent.isSimulated


reactionForce ​

Get Signature ​

ts
get reactionForce(): PhysicsVec2;

What the joint pulls on its body with (px units), last step.

Returns ​

PhysicsVec2

Inherited from ​

Joint2DComponent.reactionForce


reactionTorque ​

Get Signature ​

ts
get reactionTorque(): number;
Returns ​

number

Inherited from ​

Joint2DComponent.reactionTorque

© 2026 PlayAdGentic