• 🏆 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!

[General] Max flying height

Status
Not open for further replies.
Level 10
Joined
Oct 5, 2008
Messages
355
Hey there,

so i got a certain problem currently. If units with flight are created or fly above a elevation, they fly way higher than they actually should, which is really annoying the heck out of me, since it looks pretty bad. Is there a method to actually force a unit on a maximum flying height, much in the way as minimum flying height, so units will stick to their designated height without changing it when flying over a cliff?
 
Level 9
Joined
Jul 30, 2018
Messages
445
Periodically check the elevation of the ground under the unit then set the fly height accordingly?

  • Unit - Set Unit: (Your unit)'s Real Field: Fly Height ('ufyh') to Value: (Default flying height of (Your unit) + X)
 
Level 10
Joined
Oct 5, 2008
Messages
355
That could become problematic sice the getlLocationZ is a function that returns on ramps/bridges a desychronised varianble that gives out different heights, depending (to my knowledge) on the rendering of the corresponding PC (mainly an issue of games where mac users are involved iirc). I don't really thing that changing real fields with desychronised data is a good idea. I mean, it works with strings, since these are left alone by other systems. But the desychronised flight height would certainly bleed into other systems, like my missile system which utilizes homing on 3 dimensions, using the fleight height of the unit. And having a dummy death or damage event being desynchronized in the end would be a problem.

The best would be to get the behaviour animation-wise of a floating or walking unit with the collision if a flying one.
 
Level 10
Joined
Oct 5, 2008
Messages
355
Hover does only give the unit the flying height, but it still got ground collision (so it will still collide with terrain and destructables.

It would be great if turning off colision would work. The problem here is that the pathing algorithm still considers these units even if you could run through them. So other units don't run through them, still. Which is the main reason i want to use flying pathing.
 
Level 10
Joined
Oct 5, 2008
Messages
355
That would require to get every single terrain height change on the map and make a region for it. What could be possible is to probably map the maps locationZ's of the terrain grid and syncronize them via the game cache funktions and save them in an array. Then you could interpolate with these data for each point on the map and create a synchronized getlLocationZ with a miniscule inaccurancy for some players
 
Status
Not open for further replies.
Top