Van B,
I undersign everything you said.
Below is a code i converted from Lee's 3d example.
(keys for moving=wasd)
When I used original dbo object, the screen update was
not enough.
But with these simple cubes, it works
-------------------------------------------
set display mode 800,600,32,0,0,0,0,0,1
sync on : sync rate 60 : hide mouse
rem object to control camera (invisible eyes and focal points to set cameras by)
make object sphere 12,1 : make mesh from object 12,12
add limb 12,1,12 : offset limb 12,1,-12,0,0
add limb 12,2,12 : offset limb 12,2, 12,0,0
add limb 12,3,12 : offset limb 12,3,-12,0,50
add limb 12,4,12 : offset limb 12,4, 12,0,50
move object 12,50 : hide object 12
rem Cloned camera object for smoothing
clone object 13,12 : hide object 13
for f=300 to 400
make object cube f,10
position object f,rnd(500)-250,rnd(500)-250,rnd(500)
next f
rem setup main camera (backbuffer camera)
position camera 0,0,0 : point camera 0,0,1
rem 3D viewing vars
eyeswide#=1.0 : focalpoint#=2000 : focaldepth#=20.0
rem main loop
do
`
rem control stereoscopics
if inkey$()="1" and eyeswide#>-10.0 then dec eyeswide#,0.01
if inkey$()="2" and eyeswide#<100.0 then inc eyeswide#,0.01
if inkey$()="3" and focalpoint#>50.0 then dec focalpoint#,1
if inkey$()="4" and focalpoint#<2000.0 then inc focalpoint#,1
if inkey$()="5" and focaldepth#>-100.0 then dec focaldepth#,0.1
if inkey$()="6" and focaldepth#<100.0 then inc focaldepth#,0.1
`
rem adjust camera object limbs (eyes and focal points
offset limb 12,1,eyeswide#*-1,0,0
offset limb 12,2,eyeswide#,0,0
offset limb 12,3,focaldepth#,0,focalpoint#
offset limb 12,4,focaldepth#*-1,0,focalpoint#
`
rem Tracking control on camera object (12)--------------
p#=Get Tracking Pitch(2)
y#=Get Tracking Yaw(2)
r#=Get Tracking Roll(2)
controlobj=13
mvx#=p#
mvy#=y#
rotate object controlobj,-mvx#,-mvy#,0
rem ---------------------------------------------------------
sp#=0.0
cax#=object angle x(controlobj)
cay#=object angle y(controlobj)
caz#=object angle z(controlobj)
if scancode()=30
rotate object controlobj,0,object angle y(controlobj)-90,0
move object controlobj,1.0
rotate object controlobj,cax#,object angle y(controlobj)+90,caz#
else
if scancode()=32
cax#=object angle x(controlobj)
rotate object controlobj,0,object angle y(controlobj)+90,0
move object controlobj,1.0
rotate object controlobj,cax#,object angle y(controlobj)-90,caz#
else
if scancode()=17 then sp#=1
if scancode()=31 then sp#=-1
move object controlobj,sp#
endif
endif
position object 12,object position x(controlobj),object position y(controlobj),object position z(controlobj)
rotate object 12,object angle x(controlobj),object angle y(controlobj),object angle z(controlobj)
`
rem place left/right camera eyes using camera object limbs
cxl#=limb position x(12,1)
cyl#=limb position y(12,1)
czl#=limb position z(12,1)
cxr#=limb position x(12,2)
cyr#=limb position y(12,2)
czr#=limb position z(12,2)
cfxl#=limb position x(12,3)
cfyl#=limb position y(12,3)
cfzl#=limb position z(12,3)
cfxr#=limb position x(12,4)
cfyr#=limb position y(12,4)
cfzr#=limb position z(12,4)
set cursor 0,0
print "STEREOSCOPICS IN DBPRO - ESCAPE TO QUIT"
print "[1][2] EYES APART = ";eyeswide#
print "[3][4] FOCAL DISTANCE = ";focalpoint#
print "[5][6] FOCAL DEPTH = ";focaldepth#
set cursor 10,60:print "pitch: ";p#
set cursor 10,70:print "yaw: ";y#
set cursor 10,80:print "roll: ";r#
wait 16
position camera cxl#,cyl#,czl#
point camera cfxl#,cfyl#,cfzl#
sync
wait 16
position camera cxr#,cyr#,czr#
point camera cfxr#,cfyr#,cfzr#
sync
loop
mikko_ketonen( )hotmail.com