Its up to the coder to control the camera, the simplest way is to use "control camera using arrowkeys" command in the main loop.
sync on
rem variables
num = 1
ssize = 1 `for some reason this shows up as blue in my editor - could be from a plugin or reserved word - added extra s
rem start loop
for i=1 to 100
rem random coordinates for cubs
x = rnd(10)
y = rnd(10)
z = rnd (32)
randomize timer()
rem make cube
make object cube i,ssize
position object i,x,y,z
sync
next i
sync rate 30 `rem this out to see why I put this in
do
control camera using arrowkeys 0,0.5,2
sync
loop
There is an example in the helpfile but it doesn`t work as is for "control camera using arrowkeys" example. I wrote to Lee once highlighting this - I attempted to get it to work the way I thought it was intended to so Lee did some alterations(I had made some heafty mistakes!);
`the actual cameras you are using can be matched by backdrop colour versus the camera number
`ie first camera (0) backdrop is red and selectable with option "0"
` second camera (1) backdrop is blue and selectable with option "1"
` third camera (2) backdrop is green and selectable with option "2"
` fourth camera (3) backdrop is black and selectable with option "3"
autocam off
sync on : sync rate 60
make matrix 1,4000,4000,100,100
set matrix height 1,50,50,500
update matrix 1
position camera 0,0,500,500
backdrop on 0
color backdrop 0,rgb(255,0,0)
position camera 0,0,500,12
point camera 0,2000,0,2000
make camera 1
backdrop on 1
color backdrop 1,rgb(0,0,255)
position camera 1,0,500,12
point camera 1,2000,0,2000
make camera 2
backdrop on 2
color backdrop 2,rgb(0,255,0)
position camera 2,0,500,12
point camera 2,2000,0,2000
make camera 3
backdrop on 3
color backdrop 3,rgb(0,0,0)
position camera 3,0,500,12
point camera 3,2000,0,2000
`main
do
`switch between controls and cameras - `c` is effectively the camera number ` alter sync rate to maintain 33fps
if inkey$()="3" then c=3 : sync rate 60
if inkey$()="2" then c=2 : sync rate 60
if inkey$()="1" then c=1 : sync rate 60
if inkey$()="0" then c=0 : sync rate 60
`control relevant cammera
control camera using arrowkeys c,5,1
rem update current only
set camera view c,0,0,screen width(),screen height()
if c>0
if c=1 then sync mask %0010
if c=2 then sync mask %0100
if c=3 then sync mask %1000
fastsync
endif
`text goes here
text 0,0,str$(screen fps())
`final update
sync mask %0001
sync
loop
Thought you might find it of some help in the future - just like the helpfile example it deals with multiple cameras but also shows control camera with arrow keys use
There are other ways to control the camera. Do a forum search for mouse look, camera control, fps, 3rd person, freeflight and that sort of thing