Ok ppl, I want to load in a object, convert it too a memblock, manipulate it using the memblock write commands, then make it back into a object....I can do all that no problems, but when I use the intersect object command it fails to find the distances, it always returns 0....Try the code below, Is this a bug?
Its for a terrain X file, I want to manipulate it raise points etc...and no i dont want to use matrix's
Thanks in advance.
sync on
sync rate 60
make object box 1,50,50,50
MAKE MESH FROM OBJECT 1, 1
MAKE MEMBLOCK FROM MESH 1,1
` I would do manipulation here with write memblock float etc
`update mesh
CHANGE MESH FROM MEMBLOCK 1,1
`make object from the mesh
MAKE OBJECT 2, 1, 0
`position the newly created object
position object 2,80,0,0
do
text 0,0,"Left box distance: " + str$(intersect object(1,camera position x(),camera position y(),camera position z(),sin(camera angle y())*1000,camera angle x(),camera position z()+1000))
text 0,20,"Right box distance: " + str$(intersect object(2,camera position x(),camera position y(),camera position z(),sin(camera angle y())*1000,camera angle x(),camera position z()+1000))
rotate camera 0,camera angle x()+mousemovey(),camera angle y()+mousemovex(),camera angle z()
if upkey()=1 then move camera 2
if downkey()=1 then move camera -2
sync
loop