Walking.

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

Recommended Posts

In a game like Everquest, I have a question regarding the player and terrains. The player obviously has the ability to walk on the terrain as it slopes etc. How is the terrain represented in a client, and how would you use this terrain object to determine the height at which the player should be drawn at.

Share on other sites
not sure what you mean by "how is it represented in a client" but as for how to check where the player is to be drawn my best guess would be that the engine checks the bottom of the player's model to the faces(triangles) that make up the terrain (mesh (big collection of faces) ) If the model collides with a face then that's where it will be standing as far as the y-axis is concerned.

Share on other sites
Some times cheating is used, you know the height of whichever model then have them drawn up the right amount based on that. and you can use math to determine the grade it goes up based on the points your between, the 3 vertices of the particular triangle of the terrain mesh you in, and use those values to make it so the player doesnt pop up to the next height as this may cause it to appear as tho the play in inside the terain at times. I have the math somewhere in one of my old terrain map programs if it could be useful, but it may take some time to find, havent messed with terrain maps for a while, I like space games

Share on other sites
The terrain is generally represented by a grid of height values (a "height map" or "height field") or a mesh. Determining the height at which the player is drawn is usually done by finding the height of the point on the triangle he is over. With a mesh it means simply finding the triangle, but with a height field, you must know (or assume) how the height field is triangulated in order to figure out which triangle.

1. 1
2. 2
Rutin
15
3. 3
4. 4
5. 5

• 9
• 9
• 14
• 12
• 10
• Forum Statistics

• Total Topics
633269
• Total Posts
3011151
• Who's Online (See full list)

There are no registered users currently online

×