| 12-27-2004, 11:54 PM | #1 |
I was doing some testing with creating army's, like rows of armys facing forward. I created one row of grunts, 50 of them standing side by side facing forward. I created a second row of grunts, same thing. Behind them I created a row of 50 flying units, side by side. I noticed that their flying heights were all different becuase of the terrain, but I want to make them all the same distance above the ground, regardless of terrain. How would I do that? |
| 12-28-2004, 02:53 AM | #2 |
Well from what I know it's not very simple, but there could possibly be a better way. 1) Input the height map in some form. 2) Detect the height of the point that the unit is above. 3) Adjust the height of the flying unit so that it has the same height as the rest. Well, this is what I know from the FPS Mod. FPS Mod uses a system where there is a height map and at every point the flying unit's height is changed so that the unit sticks to the ground. I don't know the exact maths, but you can take a look and use a similar system to detect the height of the terrain that the unit is above, and then adjust the unit's height accordingly so that terrainheight+unitheight is the same. |
