-
Notifications
You must be signed in to change notification settings - Fork 329
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
Search for empty space. #288
Comments
You could use world.broadphase.aabbQuery to get all bodies overlapping the bounding box of your body. This should be faster than going through all bodies one by one directly. |
Thanks for the help.
|
Can you debug it? Step into the bodiesOverlap method? If you want a quick fix, world.broadphase.aabbQuery should work, but you'll get some extra space around your circles... |
Unfortunately, I did not understand very well what kind of information you need to debug. |
Did you find a solution for this yet? Looking at your code, it seems like you use a new Narrowphase instance when you should use the one already existing in
|
Hello. I use p2.js in node.js. I'm looking for an empty space in the world for a new (Circle) body. How can I verify that the circle covers (in whole or in part) some body in the world without calling world.step? The bodies in the world can be box, circle and fromPolygon
The text was updated successfully, but these errors were encountered: