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

Bug in BVHNode destruction #43

Open
maximemaria opened this issue Dec 22, 2016 · 1 comment
Open

Bug in BVHNode destruction #43

maximemaria opened this issue Dec 22, 2016 · 1 comment

Comments

@maximemaria
Copy link

At line : https://github.com/idmillington/cyclone-physics/blob/master/include/cyclone/collide_coarse.h#L268

Children's parent is not updated, so the tree is no more valid. The code should be :

parent->children[0] = sibling->children[0];
if (parent->children[0]) parent->children[0]->parent = parent; 
parent->children[1] = sibling->children[1];
if (parent->children[1]) parent->children[1]->parent = parent;
@ButchDean
Copy link
Contributor

I haven't tested the code but this could be an issue. Why not issue a pull request after you have updated and tested the code? :)

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