BSP Tree Collision

Started by
0 comments, last by mososky 14 years, 1 month ago
From my understanding, when testing for collisions of some object, using a BSP tree, you first traverse the tree until you find the smallest portion that the object can be in, *without* intersecting anything other nodes, ie without intersecting any other node planes. This first step is to cut away all the tree that the object cant possibly collide with. At this point im at some node in the tree which is likly to have its own left and right nodes, plus a leaf node containing scene objects. Now from my understanding, I have to then build up a list of potential collision objects. This involves traversing the current node and adding all leaf nodes from here on. As any children of this node a likly to collide with the object.Once this list is built, it is then passed on to some other collision code for testing. Either that, or the collision tests are performing while traversing the tree. Now my question is. If the BSP tree was used to model a level like Quake or Doom, the leaf nodes could contain collision meshes for scene objects, things like crates and whatnot. But what about the walls, floor and ceiling of the level? Do you test against the triangles stored in the leaf node, ie the rendering data? I would have thought that this data would be to expensive for collision testing. How is this testing done?
Advertisement
The walls/floors/ceiling would all be pretty much flat and would (should) have an very limited number of verticies. Also your not testing these with eachother since they dont move. You would only be checking the stuff in the level that can move. If you break things down into a BSP tree the number of possible collisions would be small, not computationally prohibitive.

Collision with walls would be easy. 1)get point of impact. 2)resolve interpenetration. 3) resolve the bounce (if thee should be any).

This topic is closed to new replies.

Advertisement