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

SAPBroadphase and null boundingRadius #282

Closed
yrns opened this issue May 2, 2016 · 2 comments
Closed

SAPBroadphase and null boundingRadius #282

yrns opened this issue May 2, 2016 · 2 comments

Comments

@yrns
Copy link

yrns commented May 2, 2016

I have a body with no shapes in my world, so boundingRadius is never set on the body. In SAPBroadphase, the insertions are done with the bodys' AABBs (which is a point for a body with no shapes), but the checkBounds function uses boundingRadius for the extents (which is NaN for this body). This causes bodies later in the sorted list to fail the broadphase check regardless of the extents.

The bounding radius isn't set in the constructor (or documented either). Maybe it should default to zero or checkBounds should check for null. I can submit a PR if you're interested.

@schteppe
Copy link
Owner

schteppe commented May 3, 2016

Added it. Thanks for the heads up!

@yrns
Copy link
Author

yrns commented May 3, 2016

Perfect, thanks!

@yrns yrns closed this as completed May 3, 2016
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