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

Why constraint doesn't work? #442

Closed
Magic-Bytes opened this issue Jul 9, 2017 · 3 comments
Closed

Why constraint doesn't work? #442

Magic-Bytes opened this issue Jul 9, 2017 · 3 comments

Comments

@Magic-Bytes
Copy link

Here is my code.

@liabru liabru added the question label Jul 9, 2017
@liabru
Copy link
Owner

liabru commented Jul 9, 2017

It's because you attached it to a body part instead of the parent body.
So you should change your code to use bodyA: metalFrame instead.

Maybe I should make this clearer in the docs, or I might actually create a patch so this can work.

@liabru liabru added the improve label Jul 9, 2017
@Magic-Bytes
Copy link
Author

Is there any way to attach it to the center of metalFrameA? Thanks.

@liabru
Copy link
Owner

liabru commented Jul 10, 2017

Sure try using pointA: Vector.sub(metalFrameA.position, metalFrame.position).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants