Advertisement

Suggestions needed

Started by January 02, 2001 08:38 PM
3 comments, last by The Kid 23 years, 10 months ago
Well, here is my problem. I can detect collision between two uncomplicated objects(plane, spheres, and such), but now I want to move to a higher level. I am using Nehe''s code for loading Milkshape 3D objects into a scene, and was wondering how I would go about checking for collision with that. How would I check collision between a large model, and a smaller model ? What I plan to do with the smaller one, is make a sphere around the center of the smaller model, and use that to check collision against the larger one. But how would I go about finding the edges of the large model ? Suggesting are needed, validity isn''t necisarry. Just something to get me thinking. Muchos gracias. The Kid I don''''t know what the future holds, but I know who holds the future.
I don''t know what the future holds, but I know who holds the future.
can you approximate the model with some simple shapes, similar to using the sphere for the small model?
it's all about a good time!AOLIM name: -LOKAPUJA-
Advertisement
You will probably need to either calculate a bounding box for the entire model or calculate one for each of its pieces(arms, legs, head and torso for a model of a person). You could also use spheres or ellipsoids for the bounding regions. Then if you are doing a model to model collision you would do bounding box collision tests and if you are doing model world collision you would do a bounding box plane test and go from there.

SgtBaker
Thanks a bundle to all you guys who already posted replies, your input is much appriciated. Though, I''m not sure if I''ve recieved the idea I''m looking for. Hmmmm. I''m *trying* to make a raceing type game, and the collision I''m looking for is between track parts, and car\ship\whatever model(not quite sure wich, yet) From the replies I got, I''m not sure my intent was understood, and I apologize for not making my first message acurate enough. Won''t get good answers, unless you ask the right question. Not that I''m saying the answers I got were bad, all input is taken gratefully. Thanks again.


The Kid


I don''''t know what the future holds, but I know who holds the future.
I don''t know what the future holds, but I know who holds the future.
here is what i would try:
you obviously dont want to test EVERY polygon that makes up the track, although you could try this to get it started.

then you want to split your track up in to cubes. i don''t know the technical name for this, but it is a common algorithm for 3d engines.

then only test for collision the polygons which are in the same cube as the car( or the object which might collide, whatever it may be.).

it''''s all about a good time!
-Lokapujya
it's all about a good time!AOLIM name: -LOKAPUJA-

This topic is closed to new replies.

Advertisement