Jump to content
  • Advertisement
Sign in to follow this  
hick18

BSP Tree Collision

This topic is 3117 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!