| Poster | : garfinkle | | Posts | : 7 | | Country | : England | | City | : Manchester |
| | | | Posted by garfinkle on 31/12/2008 at 12:45:02
| | Hi Reimer and everyone else,
Is there a way of retrieving the height of the terrain at an object location.
So I can load objects at terrain level just based on the x, y co-ordinates.
This would also come in handy for creating my character walk at terrain level at all times no matter the shape of terrain.
Thanks in advance
Garfinkle | |
|
|
| |
| |
| Poster | : radulph | | Posts | : 225 | | Country | : germany | | City | : hamburg |
| | | | Posted by radulph on 31/12/2008 at 13:12:07
| | Have a look at the fifth post of this thread:
http://www.riemers.net/Forum/index.php?var=1592&var2=0
greets | |
|
|
| |
| |
| Poster | : garfinkle | | Posts | : 7 | | Country | : England | | City | : Manchester |
| | | | Posted by garfinkle on 02/01/2009 at 06:30:20
| | | Thanks for that, very much appreciated :D | |
|
|
| |
| |
| Poster | : Wardy | | Posts | : 132 | | Country | : England | | City | : none i live in the sticks |
| | | | Posted by Wardy on 11/04/2010 at 09:56:59
| | Just a thought by why not just look at your heightmap?
would that not be the simplest option.
Assuming your heightmap data is in a float[,] ...
float heightAtPointX = heightMap[x,y];
?!?!?!?!?!?!?!?
Or did i miss something? | |
|
|
| |
| |
| Poster | : Kiaurutis | | Posts | : 2 | | Country | : Lithuania | | City | : VIlkaviskis |
| | | | Posted by Kiaurutis on 11/09/2012 at 04:34:35
| | | Your heightmap gives coordinates only for specific integer points, but the terrain itself is generated smooth, by some directx graphic functions. If You have 2 points: (1,1,1) and (2,2,2) and character is standing (1.5,y,1.5), y of terrain will not be exactly 1.5, because of points are not connected straight line, it is round curve, so you may have y=1.4 or y=1.7, depending on what height has neighbour points | |
|
|