Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.



This topic is 6202 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

the function PRBSP_CollisionCheck (BSPEntity, &start, &end, PlayerBBox, 20) is really useful, obviously. What I want to know is what is it with BSPs that make it so easy to do collision? Why can''t there be a PR_PROCollisionCheck (PROEntity, &start, &end, PlayerBBox, 20)? I''m just curious, I don''t know much about the inner workings of this stuff and I''m very interested. Thanks. -Rich

Share this post

Link to post
Share on other sites
The simple answer is that BSP''s subdivide space, making it fast to check collision. You only have to check collision with a few shapes rather than the entire level.

A regular PRO file has no such organization. It''s just a big list of triangles. It would be possible to check against every triangle in the list but it wouldn''t be fast enough for a game.

The BSP collision actually checks against the convex brushes that you create in the editor. These are shapes defined by planes similar to the polytope routines I have in PR, and aren''t the actual polygons drawn on the screen.

To get technical about it, the brush/polytope method stores sides of the convex shapes using the plane equation (Ax+By+Cz=d) and uses dot products to find the distance from the plane. This different representation is much faster to find collisions than using a ray/triangle intersection test.

Share this post

Link to post
Share on other sites

  • 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!