Terrain Height Issue

wingdnosring

New Member
Reaction score
16
The functions: "Height at Point" and "Cliff Level at Point" don't seem to work. I've been trying to adjust the height of a unit to 0.6 above the terrain, but unfortunately this seems to do absolutely nothing. I end up with a value beneath the ground every time.

Does anybody know a workaround for this? Or a way to detect proper terrain height?

Update: I tried removing all height alterations to the unit. I set its height to 10 so it would be a fair ways into the air. The instant it gets moved it plummets down to ground level and sticks there without me adjusting its height at all. Maybe 'ignore terrain height' is just bugged? :S It seems ridiculous that any unit with that value checked is automatically tied to the ground.
 

tain

New Member
Reaction score
0
It works fine.

There is ground, glide and air level.
When you set height to unit it fixes it while it moves, depending on its move type.

So you will probably need to set height each tick of the game.
 

wingdnosring

New Member
Reaction score
16
If you 'move instantly' it sticks to the gorund. Sorry, I should have specified that. And yes, my unit is an air unit.
 

BoreCzech

New Member
Reaction score
0
Im afraid you will have to use some kind of variable which returns the X/Y position of the unit and then set its height to X at point [x,y] which will of course change everytime the unit moves.
May be it will be possible to do it without variables, try to create trigger with While loop which activates when the unit start to move...
But I think it will be more complicated, probably more memory consuming and maybe not even possible with the normal triggers...
 

Pragm4

New Member
Reaction score
2
I've done some researching and it seems that dealing with unit Height is a bit frustrating. The editor has two different types of height, based on two different scales, similar to the Kelvin and Celsius scales.

Height at Point returns the z value of either Air, Ground, and Glide relative to absolute zero. So, if you use Height at Point on the position of a unit, you get the z value of the ground that it is standing over, not the z value of the unit.

Height of Point and Height of Unit returns the z value relative to the ground. Keep in mind that ground units all start with the value of zero because they are on the ground.

Unfortunately, there is no function to return the z value of a unit relative to absolute zero, only to the ground. You'll have to do some math in order to get about it the hard way.

With regards to your problem, I would look at the Viking and see if it can offer any clues to your problem, because the Viking can be both Air and Ground.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top