Collision detect with md2??

Started by
23 comments, last by dario_s 20 years, 12 months ago
You''re discovering why so many developers create their own file-format...

My comment is really, I don''t think MD2 is exactly what you''re looking for here. What you might want to look into is a skeletal model. Take each bone, find the verticies attached to that bone, and construct a bounding sphere around each bone. From there, you can detect which bone was struck. Still, if your models don''t have the same bones, you''ve got the same problem, no knowing what was hit.

However, if you know they will have the same bones, or a limited number of bone-sets (like 4-5 bone styles), you could then have a config file that says what each bone-style a model uses.

Plus, if you were doing that, you might be able to do some cool reactions to impacts. It''s more complicated, but I think it''s just about the best way to do what you want.

I don''t know if this helps any, but might lead you down a better road. Remember, MD2 was designed for pretty primitive collision detection, and doesn''t let you do a lot with the models. I would recommend something a bit more robust in this case.

- sighuh?
- sighuh?
Advertisement
Hmm yeah. What about md3?

Im pretty far in my game development and I have to finish it soon, but next time I do something like this I''ll try to find a better character-model format.

Thanks for the help!
Why don''t you try VALVE''s half-life format? It is a good skeletal option...
"Steel and Fire,Spreading the Holy Word,Dirty Liars,The truth has never been told" - Primal Fear
forget md3 as well, it''s just an evolved md2 format and won''t suit your needs. Look into a skeletal based model format like Half-life''s, as brucesinner pointed it out
The half-life formate is just a more advanced MD2 the core(rendering and reading the file) are pretty much the same. But I was playing with the Half-Life Model Viewer found at http://www.swissquake.ch/chumbalum-soft/index.html and it has a render mode called "hit boxes". DL it and try it out see if thats what your looking for. If you dont have a MDL file goto www.planethalflife.com or google it.

Changing formates wouldnt be that hard and would only take a week or two.
--------------------------Nukemmsn: nukem996@hotmail.comaim: nukem996open source open mind

This topic is closed to new replies.

Advertisement