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 query for bodies in BB? #12

Closed
meyerzinn opened this issue Feb 4, 2018 · 2 comments
Closed

How to query for bodies in BB? #12

meyerzinn opened this issue Feb 4, 2018 · 2 comments

Comments

@meyerzinn
Copy link
Contributor

meyerzinn commented Feb 4, 2018

#As far as I can tell, Space does not expose any mechanism to query for shapes/bodies in an area (cpSpaceBBQuery in the C version). Is it possible to access the BBTree for a Space (even if it is read-only) for calculating things like field-of-view for a game, or could a BBQuery function be added?

@meyerzinn
Copy link
Contributor Author

This is important for my use-case to calculate bodies in a player's field of view to reduce networking and enforce visibility limits (prevent cheating).

@jakecoffman
Copy link
Owner

It looks like I missed that method because Chipmunk2D doesn't use it in any of the examples. Anything in the C lib should be in this port, so feel free to put up a PR or I probably can get around to it this week.

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