i can't agree that the uvs are correct , i made a test function and i am also confused about this results.
why did it get a max value of 0.503937 ??? of the top left mesh
call it below next y
Test(TerrainObject)
function Test(obj)
//sub1 = CreateObjectFromObjectMesh ( obj, 1 )
//sub2 = CreateObjectFromObjectMesh ( obj, 2 )
//sub3 = CreateObjectFromObjectMesh ( obj, 3 )
//sub4 = CreateObjectFromObjectMesh ( obj, 4 )
mesh = 1 // 1-4
mem = CreateMemblockFromObjectMesh(obj,mesh) //1-4
local u as float,v as float
local umin as float
local umax as float
local vmin as float
local vmax as float
umin= 100
umax=-100
vmin= 100
vmax=-100
count = GetMemblockInt(mem,0)
for i = 0 to count-1
u=GetMeshMemblockVertexU(mem,i)
if u < umin then umin = u
if u > umax then umax = u
next
for i = 0 to count-1
v=GetMeshMemblockVertexV(mem,i)
if v < vmin then vmin = v
if v > vmax then vmax = v
next
for i = 0 to count-1
SetMeshMemblockVertexPosition(mem,i,GetMeshMemblockVertexX(mem,i),100,GetMeshMemblockVertexZ(mem,i)) //make it flat
next
SetObjectMeshFromMemblock(obj,mesh,mem) //write back mesh 1-4
do
print("Test")
print(GetObjectNumMeshes( obj ))
print("Count")
print(count)
print("U Min,Max")
print(umin)
print(umax)
print("V Min,Max")
print(vmin)
print(vmax)
if GetPointerPressed() then exit
Sync()
loop
endfunction
AGK (Steam) V2017.12.12 : Windows 10 Pro 64 Bit : AMD (17.12.1) Radeon R7 265 : Mac mini OS High Sierra (10.13)