I found a really easy way to make the camera rotate around something, even if it is moving.
this is the display code:
make object cube 1,10
make object box 2,100,0,100
make camera 1
position object 2,0,-5,0
position camera 1,0,10,-100
do
`camera
cx=camera position x(1)
cz=camera position z(1)
ox=object position x(1)
oz=object position z(1)
if cx<ox+75 and cx>ox-75 and cz<oz+75 and cz>oz-75
else
set camera to follow 1,object position x(1),object position y(1),object position z(1),360,<100,10,100,0
endif
point camera 1,object position x(1),object position y(1),object position z(1)
if upkey() then move object 1,3
if downkey() then move object 1,-2
if rightkey():turn object right 1,3:endif
if leftkey():turn object left 1,3:endif
sync
loop
and this is the code that you would put into your game:
`camera
cx=camera position x(1)
cz=camera position z(1)
ox=object position x(1)
oz=object position z(1)
if cx<ox+75 and cx>ox-75 and cz<oz+75 and cz>oz-75
else
set camera to follow 1,object position x(1),object position y(1),object position z(1),360,<100,10,100,0
endif
point camera 1,object position x(1),object position y(1),object position z(1)
(This was made in DBPro)