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

Broadphase Not Checking Collisions Between Children #33

Open
neon64 opened this issue Apr 13, 2015 · 1 comment
Open

Broadphase Not Checking Collisions Between Children #33

neon64 opened this issue Apr 13, 2015 · 1 comment

Comments

@neon64
Copy link

neon64 commented Apr 13, 2015

While trying to implement your system, it came to my attention that if there are two BVHNodes that don't collide, it won't check collisions between children.

As far as I'm aware that means that if the two root's children aren't colliding, then no more collisions will be tested amongst objects deeper in the tree. Upon implementing this system, I have found that hardly any collisions are generated because they are all occurring within children deep down in the tree that are never being checked.

This article on a Dynamic AABB Tree has a different algorithm that I am about to compare to see if it fixes my issue:

http://allenchou.net/2014/02/game-physics-broadphase-dynamic-aabb-tree/

Hopefully you can point me towards some information as to whether this is a bug or just my misunderstanding.

@YukinoHayakawa
Copy link

if the two root's children aren't colliding, then no more collisions will be tested amongst objects deeper in the tree.

Not really. Two objects can collide within a child of the root while they are both far away from another child. The bounding volumes of two children don't touch only means there won't be any collision between any pairs containing an object from child A and another from child B, which is independent of the check of collisions inside each of the children. The early-out routine should descend into every level of the hierarchy in order to consider every possible collision pair. So I consider it as a bug because it ignores one of the major situations.
There also has been a related post in stackoverflow which may help. http://stackoverflow.com/questions/8260848/bvh-collision-traversal-algorithm-not-looking-within-each-descendant

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