This topic is now archived and is closed to further replies.


Moving along a quadrilaterl

Recommended Posts

I''m programming a game in 3D and have run into a bit of road-block. I have a landscape, represented by quadrilaterals for tiling, and then I have units, models or a quad with a texture over it, moving over the landscape. At first I programmed this to run with the landscap tiles with a Z of 0. But now I''ve made it so the tiles have different heights with intermediary tiles and such. My question is how do I get it so that the units will move along the intermediary tiles so that they won''t go through the ground. Basically I want them to go along the same line as the tile. I''ve been trying out tons of stuff such as using the breshenham line equation thing (for lack of a better word) so that it will find the ''slope'' of the tile and then have it move up at that slope. This seems like something very basic that most first person shooter programmers would know how to do (having the camera stay above the ground at a certain height.) Any help would be greatly appreciated. -Thanks

Share this post

Link to post
Share on other sites