PDA

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



digitalash
12-28-2001, 09:39 PM
HI,

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

Regards
DiGiTaL-AsH

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