i'll try. hold on.
sync on : sync rate 0 : cls
autocam off
set ambient light 100
rem if i put a `ark in front of the load object command and take out the ` mark in front of the make sphere it works. otherwise. it crashes
load object "spaceshipdouble.3ds",1
`make object sphere 1,6
color object 1,rgb(128,128,128)
set object ambient 1,100
make object box 2,20,20,20
color object 2,rgb(255,0,0)
set object ambient 2,100
position object 2,-40,10,-20
xrotate camera 90
do
mx=mousex() : my=mousey()
screenxpos#=threedrpointx(mx,my,100)
screenypos#=threedrpointy(mx,my,100)
screenzpos#=threedrpointz(mx,my,100)
ox#=object position x(1) : oz#=object position z(1)
angle#=atanfull(screenxpos#-ox#,screenzpos#-oz#)
if keystate(17)=1 or keystate(31)=1
xdir#=sin(angle#)
zdir#=cos(angle#)
inc movex#,xdir#*(keystate(17)-keystate(31))
inc movez#,zdir#*(keystate(17)-keystate(31))
endif
if keystate(32)=1 or keystate(30)=1
xdir#=sin(angle#+90)
zdir#=cos(angle#+90)
inc movex#,xdir#*(keystate(32)-keystate(30))
inc movez#,zdir#*(keystate(32)-keystate(30))
endif
accelx#=movex#*.1
accelz#=movez#*.1
movex#=movex#*.8
movez#=movez#*.8
xpos#=xpos#+accelx#
zpos#=zpos#+accelz#
position object 1,xpos#,0,zpos#
yrotate object 1,angle#
position camera xpos#,100,zpos#
sync
loop
function threedrpointx(mx,my,distance)
cax#=camera angle x()
cay#=camera angle y()
cx#=camera position x()
cy#=camera position y()
cz#=camera position z()
fov#=62
my=screen height()-my
xdist#=(screen width()/2)/tan(fov#/2)
ydist#=(screen height()/2)/tan(fov#/2)
xwidth#=(mx-(screen width()/2))/.95
ywidth#=(my-(screen height()/2))/1.2
yang#=atanfull(ydist#,ywidth#)
zpos#=(((ydist#+distance)/tan(yang#))*sin(cax#))+(distance*cos(cax#))
xang#=atanfull(xdist#,xwidth#)
xpos#=(((xdist#+distance)/tan(xang#))*cos(cay#))+(zpos#*sin(cay#))
xpos#=xpos#+cx#
endfunction xpos#
function threedrpointy(mx,my,distance)
cax#=camera angle x()
cay#=camera angle y()
cx#=camera position x()
cy#=camera position y()
cz#=camera position z()
fov#=62
my=screen height()-my
xdist#=(screen width()/2)/tan(fov#/2)
ydist#=(screen height()/2)/tan(fov#/2)
xwidth#=(mx-(screen width()/2))/.95
ywidth#=(my-(screen height()/2))/1.2
yang#=atanfull(ydist#,ywidth#)
ypos#=(((ydist#+distance)/tan(yang#))*cos(cax#))+(distance*(-1*sin(cax#)))
ypos#=ypos#+cy#
endfunction ypos#
function threedrpointz(mx,my,distance)
cax#=camera angle x()
cay#=camera angle y()
cx#=camera position x()
cy#=camera position y()
cz#=camera position z()
fov#=62
my=screen height()-my
xdist#=(screen width()/2)/tan(fov#/2)
ydist#=(screen height()/2)/tan(fov#/2)
xwidth#=(mx-(screen width()/2))/.95
ywidth#=(my-(screen height()/2))/1.2
yang#=atanfull(ydist#,ywidth#)
ypos#=(((ydist#+distance)/tan(yang#))*cos(cax#))+(distance*(-1*sin(cax#)))
zpos#=(((ydist#+distance)/tan(yang#))*sin(cax#))+(distance*cos(cax#))
xang#=atanfull(xdist#,xwidth#)
zpos#=(((xdist#+distance)/tan(xang#))*(-1*sin(cay#)))+(zpos#*cos(cay#))
zpos#=zpos#+cz#
endfunction zpos#
EDIT:
i also have a question regarding newton setup. when i create a dbpro cylinder and a newton cylinder. the newton cylinder is side ways while the dbpro cylinder is straight up and down. so the physics aren't applying right to the physical shape. what can i do to fix this. i don't know how to rotate to fit the dbpro cylinder, and when i set the dbpro object to rotate, newton recorrects it. i figured it would just keep an offset.