Advertisement

MD2 Collision Detection

Started by March 17, 2005 07:34 AM
6 comments, last by dawidjoubert 19 years, 10 months ago
Hi i spent all of yesterday getting the md2 model implemented using some specification source... Great the man runs,jumps,dies and more but now i come to the problem of collision detection. I at the moment im using Polygon --> Ray detection for each poly in the model, thats 888 collision detection test per model,if you run 10 players thats 8880 test and that doesnt even include world-->Player,World-->Missile and so on.. My point is there must be a better way to do the collision detection?And so thats my question that i need ur genius minds for.. Regards Dawid joubert
----------------------------

http://djoubert.co.uk
You usualy don't need to run per-poly collision. Use some kind of bouding/colision volume like elipsoid. You could use one or a few of them to represent entitys in the world. You could also use low-poly verison of your models and level for colision detection. And you also need some kind of scene organization like regular-grid, octree, ABT,.. to cut down the number of potential tests.
You should never let your fears become the boundaries of your dreams.
Advertisement
Thanks darkwing i, do have all those and i do a AABB collision test and then only a futher Ray--> Polytest, i think ill condsider the lower poly versions of the model or else ill just take the punch of 888 triangles per gun shot....

There is no simple answer but id like to know how quake2 handled it?

DJ
----------------------------

http://djoubert.co.uk
Quote:
Original post by dawidjoubert
There is no simple answer but id like to know how quake2 handled it?

Then take a look. Warning : code is messy as hell.
You should never let your fears become the boundaries of your dreams.
I belive Quake II used hit boxes attached the model. I know that original Counterstrike did this and had a standard sized hit box model. You can have a gander at a CS model with the HL model viewer from the Milkshape3d site.
--
Cheers,
Darren Clark
thanks, ill conlclude on something
----------------------------

http://djoubert.co.uk
Advertisement
What exactly did you read/use to implement MD2 models in your game?

QUOTE: What exactly did you read/use to implement MD2 models in your game?

Well i got a couple of MD2 Model Specifications on the net and used some spanish tutorial. Im using fread()&fseak() to save it directly to a

class MD2Model
{
int numFaces,numVerts,numSkins;
....
....
....
}
----------------------------

http://djoubert.co.uk

This topic is closed to new replies.

Advertisement