Planning ahead, collision detection
Ive been finilazing my model format for a game i slowly developing, and I realized i had no way to do collision detection.
If I export a box that is like a wrapper around the model, will it be easy to use this do collision detection?
It will need to be fast, because the number of models will possably be very large.
yeah thats one way. It depends how acurate the collision detection needs to be. And how much your willing to give up for the acuracy.
One implementation I''ve heard of is
1) bounding sphere for detecting collision (which is fast and easy)
2) if there is, then test the bounding rectangles around each limb of the player
or the otherway aound.
I am in the same boat. I am looking for the right collision detection method to use. Theres tons of examples out there. I just haven''t decided on which one is best for my engine.
One implementation I''ve heard of is
1) bounding sphere for detecting collision (which is fast and easy)
2) if there is, then test the bounding rectangles around each limb of the player
or the otherway aound.
I am in the same boat. I am looking for the right collision detection method to use. Theres tons of examples out there. I just haven''t decided on which one is best for my engine.
For me Bounding Sphere wouldnt be right, many of my models are not centered as to make it work right, and it just wouldnt end up working right.
I think useing a wrapping box will be good, since i dont really want super graphics, i think ill have the clock cycles to spare.
I was just makeing sure that i could do collision detection with a box. I realize it wouldnt be perfect, just so as it was close. This is an RTS game. And i cant do anything to complex, because the players will be able to make there own models for the game.
I think useing a wrapping box will be good, since i dont really want super graphics, i think ill have the clock cycles to spare.
I was just makeing sure that i could do collision detection with a box. I realize it wouldnt be perfect, just so as it was close. This is an RTS game. And i cant do anything to complex, because the players will be able to make there own models for the game.
The first thing is to bound them with a sphere. Even if it''s only approximate, you''ll still want to do this test before you bother with more complex checks (like a box).
I''ve seen also a technique that utilizes multiple "levels" of spheres that each bound smaller and smaller sections of your model.
I''m writing a game right now that is essentially 2D as far as collisions go. A simple circle is sufficing for the moment, but I aim to do true collision detection (line segment by line segment). In 2D this shouldn''t be too hard.
There are also libraries available, if your so inclined. I can''t remember the names, but they''re catchy (apparently not too catchy) acronyms. I''m sure somebody knows them.
I''ve seen also a technique that utilizes multiple "levels" of spheres that each bound smaller and smaller sections of your model.
I''m writing a game right now that is essentially 2D as far as collisions go. A simple circle is sufficing for the moment, but I aim to do true collision detection (line segment by line segment). In 2D this shouldn''t be too hard.
There are also libraries available, if your so inclined. I can''t remember the names, but they''re catchy (apparently not too catchy) acronyms. I''m sure somebody knows them.
Bounding spheres are good enough and are extremely simple to implement and test for collisions.
If you wish abit more complex testing, you can choose the ellipsoid version instead. Its not much more complicated and suits most model cases.
Spheres are excellent both for rendering optimizations, collisions and lighting algorithms.
You cant pass this one up.
Check Bounding spheres tutorial
if you havent already.
Good Luck.
The Game Industry
OpenGL/OpenAL/OpenNL
If you wish abit more complex testing, you can choose the ellipsoid version instead. Its not much more complicated and suits most model cases.
Spheres are excellent both for rendering optimizations, collisions and lighting algorithms.
You cant pass this one up.
Check Bounding spheres tutorial
if you havent already.
Good Luck.
The Game Industry
OpenGL/OpenAL/OpenNL
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement