I have a terrain made of a heightmap and a md2 character that walks on the terrain. I get the height of the terrain and set this as the y value of the character.
(ymodel = GetHeight(-zmodel , xmodel )+30;)
Know the problem is that when the model walks up the hill, his feet go through the hill.
Raising the +30 (standard height on flat terrain) does help but then the character “fly’s” above the terrain.
Is their something i am missing or have i do some other calculations (angles, normals etc).
Can someone explain this to me or point me in the right directions.