• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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