View Full Version : Clamping md2 model on the surface of terrain ?

12-28-2001, 09:39 PM

i have loaded an md2 model(followed nehe tut.)
i also have a terrain. i want to move the md2 model on the terrain. i have the terrain heightmap. if i have to keep the model on top of the terrain always then i have to clamp the model using the terrain height values, for this how can i retrieve the position of the bottom most point of the model?
kindly correct me if my approach i wrong?
also suggest a method to implement the same


01-07-2002, 04:08 AM
I guess you keep track of the position of your model somewhere in an (x,y,z) format. Just take the y part of the coord and minus half the model's length from it. Or something