Code: Select all
local smart = SIMBOARD.smarts_by_names["some_smart_terrain"]
local pos_x = smart.position.x + math.random( 20 )
local pos_y = ?
local pos_z = smart.position.z + math.random( 20 )
local pos = vector( ):set( pos_x, pos_y, pos_z )
alife( ):create( "some_object", pos, smart.m_level_vertex_id, smart.m_game_vertex_id )
What is the best way to find the y-component (elevation) of the ground at the chosen x,z (lat, long) location?