Trees that you can taxi a plane under without crashing:

Trees that you can taxi a plane under without crashing:

Postby KEW » Mon Aug 10, 2009 2:07 pm

One of the fields I have made has three trees close to the edge of the runway, at the approach end. Quite often, when I just missed the runway when I was landing one of the touchy pattern planes, I would crash into the transparent area beneath the trees.

I changed the way these trees were vectored into the program. I made them in two pieces - the trunk and the branches. The trunk is only as wide as the widest part of the trunk. It takes a few seconds to calculate the height to join the two parts. You have to find the vertical height, in pixels, of the lowest branches, and then calculate what proportion of the total height this will be. You can change the height on the Branches part quite a bit before it looks out of proportion.

The following will work for the "world.scn" "Tree.bmp" and any other tree that does not have low branches or a very wide trunk:

CULL OFF
POSITION 5 -9 0
TEXTURE TREE TRANSPARENT
//BRANCHES
255 0 -5 0 12.8
0 0 5 0 12.8
0 215 5 0 2
255 215 -5 0 2
255 0 0 -5 12.8
0 0 0 5 12.8
0 215 0 5 2
255 215 0 -5 2
//TRUNK
145 214 -0.5 0 2
110 214 0.5 0 2
110 255 0.5 0 0
145 255 -0.5 0 0
145 214 0 -0.5 2
110 214 0 0.5 2
110 255 0 0.5 0
145 255 0 -0.5 0
CULL ON
User avatar
KEW
 
Posts: 161
Joined: Sat Aug 08, 2009 3:53 pm
Location: Ontario, Canada

Return to Landscapes

Who is online

Users browsing this forum: No registered users and 2 guests