• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Terrain Z-Height Problems

Status
Not open for further replies.
Level 8
Joined
Jun 20, 2004
Messages
229
Hi, Ive been having alot of trouble lately with comparing Terrain height (otherwise known as Z-Height) and Camera Height offset. Posted this on thehelper but seems no one there seemed to know.

Code:
Set Pan_Position = (Position of Sniper[(Player number of (Picked player))])
Custom script:   set udg_LocZ=GetLocationZ(udg_Pan_Position)
Camera - Set (Picked player)'s camera Height Offset to (0.00 + LocZ) over 0.00 seconds

These are the three main actions used. First is just the position of unit since camera follows, second is finding the Z-height of the position the unit is, and the third trigger is from the camera which it sets the camera height to the Z height of the terrain then + whatever for an eyes view but I did 0 for testing to see if its directly on the ground or too high/low.

As of right now, this is the troubling part which I see no possible answer to atm... If I preset terrain height on the map (as in I use the map editor) the camera is either too high or too low usually off by 100-500 depending on your Z-height. I cannot see why this is happening.

But, if I use my map generator using triggers that set the maps terrain heights using deformation, it works fine. The height will be right on and always exact.

Does anyone know why this might be happening? :banghead:

Hopefully some1 here knows, thanks in advance :D
 
Status
Not open for further replies.
Top