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

The box-sphere collision test algorithm produces zero normal when a sphere's center is inside a box #34

Open
YukinoHayakawa opened this issue May 7, 2015 · 0 comments

Comments

@YukinoHayakawa
Copy link

According to the code above https://github.com/idmillington/cyclone-physics/blob/master/src/collide_fine.cpp#L623 the closestPt will be equal to relCentre if the center of the sphere is inside the box, which leads to a normal with zero length. Then you make a coordinate system with the zero normal and get a degenerated matrix with NaNs. The NaNs spread into every single part of the simulation and mess it up entirely.

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

1 participant