Dear All,
I'm having a problem with add limbs. I am doing something really simple. I am creating a plane from 8 triangles, creating meshes from the last 7 triangles, and adding them as limbs to the first triangle.
The first bit (creating the objects) works fine, but once I have added the limbs...the final object still consists of the only of first object and all the limbs disappear. Is there something I don't understand? Are limbs added in object centred coordinates or world coordinates. I am assuming the meshes will be added in their current positions but perhaps I am wrong? I've tried removing the delete object and delete mesh commands in the code below but no difference.
xt# = ixe*oneblocksize#*2.0
zt# = ize*oneblocksize#*2.0
Rem Test to see if a road already exists at this point
For i=-1 to 1
For j=-1 to 1
vp(2+i, 2+j, 1) = xt#+oneblocksize#*i
vp(2+i, 2+j, 3) = zt#+oneblocksize#*j
vp(2+i, 2+j, 2) = get terrain ground height(TRN_obj, xt#, zt#)+dh#
Next j
Next i
Rem Create triangles
numtri=0
obj=110
For i=1 to 2
For j=1 to 2
make object triangle obj+numtri, vp(i,j,1), vp(i,j,2), vp(i,j,3), vp(i+1,j,1), vp(i+1,j,2), vp(i+1,j,3), vp(i,j+1,1), vp(i,j+1,2), vp(i,j+1,3)
inc numtri
make object triangle obj+numtri, vp(i+1,j,1), vp(i+1,j,2), vp(i+1,j,3), vp(i+1,j+1,1), vp(i+1,j+1,2), vp(i+1,j+1,3), vp(i,j+1,1), vp(i,j+1,2), vp(i,j+1,3)
inc numtri
Next j
Next i
Rem Add objects together
For i=1 to 7
make mesh from object obj+i, obj+i
add limb obj, i, obj+i
link limb obj, 0, i
offset limb obj, i, 0, 0, 0
delete object obj+i
delete mesh obj+i
Next i
Rem object obj now still consists of only one triangle.
I just know this will be a very simple answer!
Best,
Mr Grumpy
GrumpyOne - the natural state of the programmer