Advertisement

MD2 Bounding Box?

Started by October 01, 2001 08:42 AM
1 comment, last by djdynamic 23 years, 4 months ago
Do MD2 files have a bounding box built in around the model, or do I have to make my own for it ? If so, any ideas.... ( I need the bounding box for collision detection... Testing every triangle would be stupid )
As far as i know, md2 does not contain bounding info for you. It *shouldnt* be too hard. If you can find out how tall, wide, and thick the model is then creating a bounding box can be formed fine. Ive heard of bounding ellipsoids being useful as well, so find some info on that. good luck.
Advertisement
AFAIK .md2 files don''t contain BB info so what I do is precompute a BB for each keyframe and then as I''m using linear interpolation at runtime I take the BB of the 2 current BBs (the one for the "start" keyframe and the one for the "end" keyframe). This gives me a correct, if not optimal (use of Oriented BB might help here!) BB for the model.

This topic is closed to new replies.

Advertisement