Archived

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

Rainmaker

q3 bsp collision problems

Recommended Posts

Hey, I am working on an engine (heh, who isnt) that uses the q3 bsp format. I managed to stumble upon gametutorials.com''s lovely tutorials and followed em closely, but skipped the lightmap. Well then I decided to add collision detection. Now I know that the q3bsp format uses brushes to define the collision, but the information out there is just too skimpy to really use them, considering that I can just do a poly by poly check. So I wrote a function that calculates the new camera position, grabs the leaf the new camera position is in, and tests for collisions (poly vs sphere). If there are collisions, then it adds the pushbacks to the new position and sets the camera position. Well, that works great- for a little over half of the polys. The rest do not work. Why, I do not know. My collision code can be found at http://members.cox.net/frazee/collision.txt. Any ideas? Thx! L8r, The Rainmaker

Share this post


Link to post
Share on other sites