Hi all,
I am having problems with getting the correct y-height value of a hightmap terrain's vertix belonging to a certain face (of which I 've got the index).
I believe that the problem might be that my heightmap mesh has been scaled (vertical_scale="150.0", patch_size="1200.0") and that the HYP_Mesh.GetVertexPosition method does not return the right height for the scaled mesh but for the original un-scaled one.
I may be wrong of course! Here is what I am trying to do:
faces_number = HYP_Mesh.GetNumFaces( "islands_terrain" ) - 1
while ( clusters<tree_clusters ) do
cluster_face = math.random( 0, faces_number ); -- find a random face of the terrain
a_cluster, b_cluster, c_cluster = HYP_Mesh.GetFaceIndexes( "islands_terrain", cluster_face ); -- return the 3 vertices of that face
cluster_x, cluster_y, cluster_z = HYP_Mesh.GetVertexPosition( "islands_terrain", a_cluster ); -- return the x,y,z position of the first vertix
if ( cluster_y > 0 ) then -- if the cluster_y is above water level (There is a water level at y=0)
blah, blah, blah...
Any ideas?