Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Length of DistanceJoint cannot be set through DistanceJointDef #31

Closed
spinthil opened this issue Sep 14, 2017 · 1 comment
Closed

Length of DistanceJoint cannot be set through DistanceJointDef #31

spinthil opened this issue Sep 14, 2017 · 1 comment

Comments

@spinthil
Copy link

Hallo,
I'm using a DistanceJoint to attract a DynamicBody to a static center Body. The original Box2D implementation allows setting the length of the DistanceJoint through DistanceJointDef. In planck-js the length is automatically calculated as the distance between the two anchors:

this.m_length = Vec2.distance(anchorB, anchorA);

Currently I'm overwriting m_length after creating the joint. It would be nice if the length could be specified in the definition.

@shakiba
Copy link
Collaborator

shakiba commented Sep 16, 2017

Thanks for reporting the issue! It would be great if you make a PR to fix it! :)

@shakiba shakiba closed this as completed Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants