Jump to content
  • Advertisement


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


Moving along a quadrilaterl

This topic is 6252 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!