| 03-31-2009, 04:23 AM | #1 |
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 |
Compare GetLocationZ() at the two different locations? Or is that too simple...? |
| 03-31-2009, 01:52 PM | #3 |
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 |
This can be useful in some cases: 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 | |
Quote:
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. |
