I see well I shall just leave a version on what I have been working on and what I got help with Vice with so you can see the method I am working on
sync on
sync rate 33
autocam off
draw to front
rem background star texture
create bitmap 1,256,256
set current bitmap 1
for i = 0 to 1000
s=128+rnd(127)
ink rgb(s,s,s),0
dot rnd(255),rnd(255)
next i
sync
get image 1,0,0,256,256
delete bitmap 1
cls
rem background star object
make object sphere 1,1000
texture object 1,1
scale object texture 1,5,5
set object 1,1,1,0,1,0,0,0
rem planet
make object sphere 2,100
color object 2,rgb(0,255,0)
position object 2,0,0,0
rem hidden guide object
make object plain 47,1,1
hide object 47
rem make object to drive on planet
make object cube 11,1
color object 11,rgb(0,255,255)
rem put camera and vehicle object on surface of planet to set started
position object 47,object position x(2),object position y(2),object position z(2)
move object 47,52
position camera object position x(47),object position y(47),object position z(47)
pitch camera down 90
position object 11,camera position x(),camera position y(),camera position z()
set object to camera orientation 11
mainloop:
position object 47,object position x(2),object position y(2),object position z(2)
point object 47,object position x(11),object position y(11),object position z(11)
move object 47,52
position object 11,object position x(47),object position y(47),object position z(47)
xc2#=object position x(11):yc2#=object position y(11):zc2#=object position z(11)
ppx=object position x(2):ppy=object position y(2):ppz=object position z(2)
set object to camera orientation 11
dx#=abs(xc2#-ppx)
dy#=abs(yc2#-ppy)
dz#=abs(zc2#-ppz)
camdist#=sqrt((dx#*dx#)+(dy#*dy#)+(dz#*dz#))
position object 47,xc2#,yc2#,zc2#
set object to camera orientation 47
turn object left 47,90
move object 47,10
gx#=object position x(47)
gy#=object position y(47)
gz#=object position z(47)
dx#=abs(gx#-ppx)
dy#=abs(gy#-ppy)
dz#=abs(gz#-ppz)
rolldist#=sqrt((dx#*dx#)+(dy#*dy#)+(dz#*dz#))
rollhor#=(camdist#-rolldist#)*9.0
roll object right 11,rollhor#
position object 47,xc2#,yc2#,zc#
set object to camera orientation 47
pitch object up 47,90
move object 47,90
gx#=object position x(47)
gy#=object position y(47)
gz#=object position z(47)
dx#=abs(gx#-ppx)
dy#=abs(gy#-ppy)
dz#=abs(gz#-ppz)
topdist#=sqrt((dx#*dx#)+(dy#*dy#)+(dz#*dz#))
if topdist#<camdist# then set object to camera orientation 11:roll object right 11,180-rollhor#
position object 47,xc2#,yc2#,zc2#
set object to camera orientation 47
move object 47,10
gx#=object position x(47)
gy#=object position y(47)
gz#=object position z(47)
dx#=abs(gx#-ppx)
dy#=abs(gy#-ppy)
dz#=abs(gz#-ppz)
pitchdist#=sqrt((dx#*dx#)+(dy#*dy#)+(dz#*dz#))
position object 47,xc2#,yc2#,zc2#
point object 47,plx#,ply#,plz#
move object 47,10
dx#=abs(gx#-ppx)
dy#=abs(gy#-ppy)
dz#=abs(gz#-ppz)
pitchdist#=sqrt((dx#*dx#)+(dy#*dy#)+(dz#*dz#))
pitchor#=(camdist#-pitchdist#)*9.0
pitch object up 11,pitchor#
if joystick up()=1 then pitch object up 11,0.001
if joystick down()=1 then pitch object down 11,0.001
if joystick slider a()=0 then move object 11,1
if joystick slider a()=65535 then move object 11,-1
if joystick right()=1 then turn object right 11,1
if joystick left()=1 then turn object left 11,1
if joystick twist z()=-1000 then turn object left 11,90:move object 11,1:turn object right 11,90
if joystick twist z()=1000 then turn object right 11,90:move object 11,1:turn object left 11,90
rem *********************************************************************
rem Player Hovercraft Jumping
rem *********************************************************************
if jumpb=1
height#=height#-.9
endif
if mouseclick()=2 or spacekey()=1 or joystick fire x(4) and ajump=1
jumpb=1
height#=3
endif
if height#<-1 then height#=-1
if object position y(2)>5 then ajump=0 else ajump=1
position object 2,object position x(2),object position y(2)+height#,object position z(2)
if object position y(2)<5
jumpb=0
height#=0
endif
rem HAT control
jhat=joystick hat angle(0)
text 10,10,"HAT signal: "+str$(jhat)
text 10,20,"Joystick: "+str$(jx)+"/"+str$(jy)
text 10,30,"Slider: "+str$(joystick slider a())
text 10,40,"FPS: "+str$(screen fps())
rem Set the hat look flags to nothing
lookUp = 0: lookLeft = 0: lookRight = 0: lookBack = 0
if jhat = 0 then lookUp = 1
if jhat=9000 or jhat=4500 or jhat=13500 then lookRight = 1
if jhat=31500 or jhat=27000 or jhat=22500 then lookLeft = 1
if jhat = 18000 then lookBack = 1
If InKey$() = "1" Then cammode = 1 : ` third person
If InKey$() = "2" Then cammode = 0 : ` first person
If cammode = 0
rem Place camera and set orientation to object for FPS
position camera object position x(11),object position y(11)+0,object position z(11)
set camera to object orientation 11
if lookRight = 1 then turn camera right 90.0
if lookLeft = 1 then turn camera left 90.0
if lookUp = 1 then pitch camera up 45.0
if lookBack = 1 then turn camera right 180.0
else
rem put camera behind vehicle object for 3rd person view
position camera object position x(11),object position y(11),object position z(11)
set camera to object orientation 11
pitch camera down 20
move camera -5
endif
sync
goto mainloop:
It works but I have problems making it work with imported models and getting the scaling right and the mountains and hills I want but I have DBP so I will try the intersect object in there, but just goes to show how much flexible live Dark Basic Classic still has in it