Here I updated it to exclude that stuff.
`3RD Person space flight test #1 by Zener
`SETUP
sync on
sync rate 60
set camera range 1,20000
`make root object for limb
make object plain 1,1,1
`make object a mesh to allow adding limbs
make mesh from object 1,1
`add limb used for 3rd person object mount
add limb 1,1,1
offset limb 1,1,0,0,0
`add limb used as camera mount
add limb 1,2,1
offset limb 1,2,0,1.5,-5
`hides the limb root object
hide object 1
`create 3rd person object
make object box 2,2,0.5,1
`create spheres to see movement
for n = 10 to 20
make object sphere n,n
next n
position object 10, -100,0,-200
position object 11, -150,0,-200
position object 12, -200,0,-200
position object 13, 0,0,-200
position object 14, 100,0,-200
position object 15, 150,0,200
position object 16, 200,0,-200
position object 17, 20,50,-300
position object 18, 20,100,300
position object 19, 20,150,300
position object 20, 20,-100,300
`main loop
do
`movement controls
`mouse control
ScreenMidX = screen width() / 2
ScreenMidY = Screen height() / 2
ObjYaw# = (MouseX() - ScreenMidX) / 200.0
ObjPitch# = (MouseY() - ScreenMidY) / 150.0
turn object right 1,ObjYaw#
pitch object down 1,ObjPitch#
`keyboard control
if keystate(17) = 1 `(W-key
speed# = speed# + 0.02
if speed# > 1 then speed# = 1
endif
if keystate(31) = 1 `(S-key)
speed# = speed# - 0.1
if speed# < 0 then speed# = 0
endif
`move forward based on speed#
move object 1,speed#
`camera leading
LeadX# = ObjYaw# * 1.5
LeadY# = -ObjPitch# * 1.5
offset limb 1,2,LeadX#,LeadY#,-5
`Roll
if keystate(16) = 1 then roll object left 1,0.5 `(Q-key)
if keystate(18) = 1 then roll object right 1,0.5 `(E-key)
`glue 3rd person object to limb mount
position object 2,limb position x(1,1),limb position y(1,1),limb position z(1,1)
rotate object 2, object angle x(1),object angle y(1),object angle z(1)
`glue camera to camera limb mount
position camera limb position x(1,2),limb position y(1,2),limb position z(1,2)
rotate camera object angle x(1),object angle y(1),object angle z(1)
`debug text output
text 10,10, "Fps:" + str$(screen fps())
text 10,20, "Speed:" + str$(Speed#)
sync
loop
I updated this code snipit to simulate a leading camera.
ignore the source button below, i pasted the wrong code in it hehe.