HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How Do I Get Fly Units To Not Fly Higher Over Trees?

03-08-2008, 03:57 AM#1
Brash
I have these units that are flying and are made out to be like bullets.. so i want them to go straight.. but when they fly near or over trees you see them hover up higher like regular flying units would.. is there a way to prevent that? I need them locked at specific height.
03-08-2008, 04:06 AM#2
waaaks
i think u need to change the movement type of the unit to ground, and make its collision to 0 and give it locust, but the problem with it, is, sometimes, it doesnt collide with other objects, making it more sucky
03-08-2008, 04:58 AM#3
Brash
they have to be air for other purposes.
03-08-2008, 05:15 AM#4
zen87
I tried to do something like this before, result = impossible

flying = fly over trees no matter what you do
03-08-2008, 05:31 AM#5
Brash
what is that thing called occlusion? does that have anything to do with height over trees?
03-08-2008, 05:35 AM#6
Rising_Dusk
Quote:
they have to be air for other purposes.
If that's the case, I think you're out of luck. If the unit is a ground unit, you can perform the crow form trick to give it a flying height that won't deform with terrain. This is generally the most practical method.
03-09-2008, 03:05 PM#7
Zandose
Try to trigger it. Anything which changes a units flying units height has three things (I think), height and rate of change, and collision (area of height effect?). Find the flying height, rate of change, and collision, and save it into a variables. Destructables, terrain height, cliff height (?), etc.

This next part im not so sure on. You need to make a trigger to counter any changes to the units flying height. Checking the units direction and distance covered (unit speed) vs. any obstacles and collision. I suggest a timer trigger.

Edit: I believe occlusion has to do with how high a unit has to be to see over a tree.
03-11-2008, 07:11 AM#8
Tide-Arc Ephemera
Occulusion height has to do with how much "sight radius" something blocks.

However, try a GetTerrainZ check, trees might be changing the terrain Z.
03-12-2008, 12:52 AM#9
midiway
Quote:
Originally Posted by Tide-Arc Ephemera
However, try a GetTerrainZ check, trees might be changing the terrain Z.

No, they aren't. I tested.
03-12-2008, 01:54 AM#10
Rising_Dusk
It's a built-in flying unit pathing system, there's no way to avert it unless you use ground units with the flying height trick. I mentioned that above already, it's something we sort of have to just deal with.