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

how to use mouseJoint without the testbed #178

Open
bobcgausa opened this issue Apr 21, 2021 · 3 comments
Open

how to use mouseJoint without the testbed #178

bobcgausa opened this issue Apr 21, 2021 · 3 comments

Comments

@bobcgausa
Copy link

bobcgausa commented Apr 21, 2021

I'm writing a p5 interface for planck and i don't use the testbed because i want p5 graphics.
however i can't create a mouse joint in mousePressed

so i created a mousejoint statically

now what can i do in mousePressed to set the target body and location?
any help appreciated

here's the example
https://editor.p5js.org/Bobcook47/sketches/OlzHvRszI

i only want to drag the figure that i click

I already did a P5 box2d interface with a much more extensive tutorial than any that I found for planck
https://github.com/bobcgausa/cook-js
I plan to rewrite the tutorial for planck once i finish but i need HELP with modifying a mouse joint dynamically

@bobcgausa
Copy link
Author

here's the p5 example
https://editor.p5js.org/Bobcook47/sketches/OlzHvRszI

@shakiba
Copy link
Collaborator

shakiba commented Apr 21, 2021

Have you checked out testbed code? It is in testbed folder.

@bobcgausa
Copy link
Author

bobcgausa commented Apr 21, 2021 via email

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