Edit: even better code, use source below in message and not source code box.
Now this must work - I've re-done it using info I've fond on the web. I've tried this with my glasses and I'm sure it's 3D. It works very well.
make object cube 1,10
make object sphere 2,20 : position object 2,0,5,10
` Cameras
set camera to image 0,3,512,512 : color backdrop 0,rgb(0,0,0)
make camera 1 : set camera to image 1,1,512,512 : color backdrop 1,rgb(0,0,0)
make camera 2 : set camera to image 2,2,512,512 : color backdrop 2,rgb(0,0,0)
` Position cameras correctly
position camera 0,0,0,-30
position camera 1,-0.5,0,-30
position camera 2,0.5,0,-30
` Setup display
sprite 1,0,0,1
sprite 2,0,0,2
set sprite alpha 1,128
set sprite alpha 2,128
size sprite 1,640,480
size sprite 2,640,480
set sprite diffuse 1,255,0,0
set sprite diffuse 2,0,0,255
` Main loop
do
inc i#,0.5
yrotate object 1,wrapvalue(i#)
position camera 0,0,-30 + sin(i#) * 10
gosub updatecam
sync
loop
UpdateCam:
x# = camera position x()
y# = camera position y()
z# = camera position z()
ax# = camera angle x()
ay# = camera angle y()
az# = camera angle z()
position camera 1,x#,y#,z# : rotate camera 1,ax#,ay#,az#
position camera 2,x#,y#,z# : rotate camera 2,ax#,ay#,az#
turn camera left 1,90
move camera 1,0.5
turn camera right 1,90
turn camera right 2,90
move camera 2,0.5
turn camera left 2,90
return
Even my brother agrees, and he's been rejecting all my other attempts!
You are the
th person to view this signature.
GRAVITY: I fought the law but the law won