HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Distinguishing terrain height.

03-31-2009, 04:23 AM#1
Blackroot
Hey there; I'm having a bit of trouble finding some solutions to this problem. I need to find the different between terrain height from a point a to a point b. Or more generally; the terrains height. I don't need to account for terrain deformation; only the 'wall' terrain and terrain ramps.

Any input would help greatly! =]
03-31-2009, 09:26 AM#2
Pyrogasm
Compare GetLocationZ() at the two different locations? Or is that too simple...?
03-31-2009, 01:52 PM#3
0zyx0
If you don't want to account for deformation, you have to get the nearest possible cliff height to the height the location is at.
03-31-2009, 02:30 PM#4
Iron_Doors
This can be useful in some cases:
Collapse JASS:
(GetTerrainCliffLevel(x, y) - SOME_INTEGER_OFFSET) * bj_CLIFFHEIGHT

I once removed terrain pathing from my map by importing some blank file in place of whatever file it was that contains pathing. (Atleast) After that GetLocationZ() returned far too smoothened values near cliff edges for my needs, so I used the above instead. This ofcourse works well only if all change in terrain height comes from cliffs.

That SOME_INTEGER_OFFSET was the default cliff level or something... can't remember exactly, but it is easy to figure out by testing.
04-01-2009, 07:05 AM#5
Blackroot
Quote:
Originally Posted by Iron_Doors
This can be useful in some cases:
Collapse JASS:
(GetTerrainCliffLevel(x, y) - SOME_INTEGER_OFFSET) * bj_CLIFFHEIGHT

I once removed terrain pathing from my map by importing some blank file in place of whatever file it was that contains pathing. (Atleast) After that GetLocationZ() returned far too smoothened values near cliff edges for my needs, so I used the above instead. This ofcourse works well only if all change in terrain height comes from cliffs.

That SOME_INTEGER_OFFSET was the default cliff level or something... can't remember exactly, but it is easy to figure out by testing.

yeah; this was my problem. GetLocationZ was smoothing the little *hills* that ramp up to the next terrain plateu. I figure half way up the ramp would return 50% of a cliff; but that's not true. I'll try this.