Hi All,
For some reason the simplest of code is entirely ignoring depth. Objects that are behind are being drawn on top.
I would appreciate any help on this as I am momentarily flumoxed. I am running U1.076
Most of the last part was just added to control the camera to let me see what is going on, so it doesn't matter too much. The code will do the same if I just set up the camera, add 2 objects and position them.
I have not seen this before. All my other programs are still working and I haven't done anything much to my computer to affect driver etc.
sync on : sync rate 0 : backdrop on : autocam off
set image colorkey 255,0,255
set camera range 0, 50000
position camera 0, 0, -2000
point camera 0, 0, 0
`Create a camera object
make object cube 1000, 1
make mesh from object 1, 1000
add limb 1000, 1, 1
link limb 1000, 0, 1
add limb 1000, 2, 1
offset limb 1000, 2, 0, 0, -640
link limb 1000, 1, 2
make object cube 200, 100
position object 200, 0, 0, 0
global g_move_obj_number as integer : g_move_obj_number = 201
make object sphere g_move_obj_number, 100
position object g_move_obj_number, 0, 0, -100
do
if upkey() = 1
position camera camera position x(), camera position y()+1, camera position z()
endif
if downkey() = 1
position camera camera position x(), camera position y()-1, camera position z()
endif
if leftkey() = 1
position camera camera position x()-1, camera position y(), camera position z()
endif
if rightkey() = 1
position camera camera position x()+1, camera position y(), camera position z()
endif
position camera limb position x(1000, 2), limb position y(1000, 2), limb position z(1000, 2)
point camera 0, 0, 0
xrotate object 1000, object angle x(1000) + 0.1
yrotate object 1000, object angle y(1000) + 0.1
if g_move_obj_number < 3000
inc g_move_obj_number, 1
if object exist(g_move_obj_number) = 0
make object sphere g_move_obj_number, 100
position object g_move_obj_number, object position x(g_move_obj_number - 1), object position y(g_move_obj_number - 1), object position z(g_move_obj_number - 1) + 30
endif
endif
sync
loop
end