sorry, code got messed up... let me try again
_player_motion:
if shiftkey()=1 then speedMulti# = 1.5 else SpeedMulti# = 1
if upkey()=1 then xrotate object 1,oAx# +5
if downkey()=1 then xrotate object 1,oAx# -5
if rightkey()=1 then yrotate object 1,oAy# +5
if leftkey()=1 then yrotate object 1,oAy# -5
rem this part of the code calculates the thrust in the current direction
if ObjForceNow# > 5 and spacekey()=0 then dec objForceNow#,10 else if objectForceNow# <= 5 and spacekey()=0 then objectForceNow# = objectForceNow# - objectForceNow#
if spacekey()=1 then objectForceNow# = (objectForceNow# + (10 * SpeedMulti#))
rem this part of the code calculates the thrust in the actual movement achieved in the previous cycle
x1# = object position x(1)
y1# = object position y(1)
z1# = object position z(1)
oTAx# = objectTravelAngle(x1#,y1#,z1#,x2#,y2#,z2#,x)
oTAy# = objectTravelAngle(x1#,y1#,z1#,x2#,y2#,z2#,y)
oTAz# = objectTravelAngle(x1#,y1#,z1#,x2#,y2#,z2#,z)
oAx# = object angle x(1)
oAy# = object angle y(1)
oAz# = object angle z(1)
rotate object 1,oTAx#,oTAy#,oTAz#
displacement# = objdisp(1,oldforce#,objmass)
move object 1,displacement#
rotate object 1,oAx#,oAy#,oAz#
displacement# = objdisp(1,objectforcenow#,objmass)
move object 1,displacement#
x2# = object position x(1)
y2# = object position y(1)
z2# = object position z(1)
oldforce# = ObjForceCalc(pythag3d(x1#,y1#,z1#,x2#,y2#,z2#),objMass#)
rem this section positions the camera behind the player and slightly above
Camerax# = Newzvalue(x2#,oAx##-180,200)
Cameray# = Newzvalue(y2#,oAy##-180,200)
CameraZ# = Newzvalue(z2#,oAz##-180,200)
position camera Camerax#,Cameray#,CameraZ#
point camera x2#,y2#,z2#
return