Skip to content

'FindCollidingPairs' in Broadphase #257

Answered by jrouwe
lmtss asked this question in Q&A
Discussion options

You must be logged in to vote

I chose to do active objects vs tree because:

  1. It's simple
  2. Usually there are not that many active objects compared to the total amount of objects
  3. It's trivially parallelizable (all cores will take a subset of the active objects array and collide against the tree)
  4. Active objects can be created during collision detection from multiple threads at the same time (an active object colliding with a sleeping object will make it active which in turn can activate another body), that complicates maintaining a tree of them
  5. If you put active objects in a tree, you will need to build and/or maintain that tree. Building a tree every frame means you can start the collision detection process only after yo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lmtss
Comment options

Answer selected by lmtss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants