-
Notifications
You must be signed in to change notification settings - Fork 242
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
Intersections between edge bodies or chain bodies #105
Comments
Dear Ali,
Thank you so much for your quick reply. But for some reasons I also need to
make several polygons be contained in a big polygon. Does it possible by
using polygon type?
Thank you so much!
… Could you try using polygons instead?
As far as I know edge/chair work with static bodies (like ground), so not
useful for this case.
|
As far as I know if your container is dynamic this is the common solution: |
Thank you so much Ali, this helped a lot. it is now much better. |
Could you share your testbed on codepen/jsbin? |
Dear Ali, I made a codepen, here is the link: https://codepen.io/bozheng-stokes/pen/abormNX Thank you very much for your advice on this. |
Could you try setting walls as bullet? |
|
Great example by the way, thanks for sharing it! I will add it to list of projects made with planck.js, if you don't mind? |
Dear Ali, thank you for your time on this. This parameters are very tricky...is there any best practices? https://github.com/Sinova/Collisions/blob/master/README.md#anchor-demos Can this be integrated into Planck.js? |
Actually my first suggestion (setting bullet: true for walls) was correct. I was setting that for other bodies by mistake. Please ignore my other suggestion. Just change line 181 to |
That's a very interesting open-source project, but I'm just maintaining planck.js right now. |
Thank you very much Ali. It indeed works. But actually these objects are not at a high speed, why they still can cause intersections? Also the computational cost of setting them to bullets is really high. When I set objects' bullet to true, the computation time seems exponentially increased according to the number of the bullet objects. How is the difficulty of solving this in planck.js? |
You may also be able to fix it by adjusting Also I recommend discussing this with Box2D community as well, Planck.js is based on Box2D. |
Dear Ali, first thank you for this simple and powerful library you have developed.
I am using it in my research. And I met a problem.
when I try to make packed convex hulls. These hulls I used connected "edge" shape.
The code is like this:
when I use DistanceJoint to drew these "convex hull" body together, After the simulation, it results these intersections.
The setting of DistanceJoint I used is:
The simulation setting is:
When I change this convex hulls into "chain" type, seems the result it the same.
Do you have any idea about this? Do these settings influence the result? How to avoid intersections? Many thanks!!
The text was updated successfully, but these errors were encountered: