Colision Detection in Quake Scenes
Hello, I recently finished the excelent tutorials in www.gametutorials.com about rendering a quake 3 scene. Now I would like to add collision detection. Can anyone explain to me how to do this or point to a tutorial about this?
Thanks in advance
quake uses AABB
AxisAlignedBoundingBoxes
usually there are 4 BBs
small 16x16x16
medium
32x32x32
large
32x32x72
and huge 128x128x128
although the last one is often rescaled within the model files already to fit exactly the needs of the specific entity
before you read tutorials about how to do this collision detection id suggest you think of it on your own try it and soon you will encounter the problems like
steps jump crouch prone .....
try it on your own and once you get stuck take a tutorial as a reference of comparsion on how they did it
AxisAlignedBoundingBoxes
usually there are 4 BBs
small 16x16x16
medium
32x32x32
large
32x32x72
and huge 128x128x128
although the last one is often rescaled within the model files already to fit exactly the needs of the specific entity
before you read tutorials about how to do this collision detection id suggest you think of it on your own try it and soon you will encounter the problems like
steps jump crouch prone .....
try it on your own and once you get stuck take a tutorial as a reference of comparsion on how they did it
erm
if you want to know if a collision with a polygon is possible at all
take one of the 8 points of your boundingbox
take the distance between this point and the origin of the entity
this will give you the radius of a sphere that includes the boundingbox completely
move your entity into the desired direction
and check your origin against the plane of your polygone
if the distance is bigger than the radius of the sphere which you have calculated before, you can skip the current polygon and the performance expensive AABB->POLYGON TEST
if you want to know if a collision with a polygon is possible at all
take one of the 8 points of your boundingbox
take the distance between this point and the origin of the entity
this will give you the radius of a sphere that includes the boundingbox completely
move your entity into the desired direction
and check your origin against the plane of your polygone
if the distance is bigger than the radius of the sphere which you have calculated before, you can skip the current polygon and the performance expensive AABB->POLYGON TEST
Thanks for the reply.
This AABB x AABB and AABB x triangle tests are the final (I believe) collision tests , that you do when you have already reduced the number of collision tests to be performed. What I really wanted to know is what type of system is used rapidly discard objects that can´t collide with a certain object. When the objects move in the world , how this system is updated? I think the BSP will probably be used , but how?
This AABB x AABB and AABB x triangle tests are the final (I believe) collision tests , that you do when you have already reduced the number of collision tests to be performed. What I really wanted to know is what type of system is used rapidly discard objects that can´t collide with a certain object. When the objects move in the world , how this system is updated? I think the BSP will probably be used , but how?
BSP-trees can be used for collision detection, although I don''t know how. I''m using octrees (supposed to be basicly the same as bsp, but divides in 8 branches instead of 2) in my project and it works fine reducing the amount of triangles to process.
Advanced Collision Detection TechniquesIs an article that''s supposed to cover collision detections with bsp-trees, haven''t read it, so I don''t know much about it.
You would want to browse through the other articles about collision detection in the resource section.
-Luctus
Codito, Ergo Sum (Courtesy of ThinkGeek)
[Mail][DreggSoft]
Advanced Collision Detection TechniquesIs an article that''s supposed to cover collision detections with bsp-trees, haven''t read it, so I don''t know much about it.
You would want to browse through the other articles about collision detection in the resource section.
-Luctus
Codito, Ergo Sum (Courtesy of ThinkGeek)
[Mail][DreggSoft]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement