I've been working on this for days. The problem is, well the ship navigates fine, but if it hits a certain angle like when I pull up, and I want to go left...well, the ship banks to the left but it turns to the right.
Using this code, I would preferable just ignore turning left or right in space, and just allow for a roll and up/down, the player can then make his turns by using a combination. I wouldn't mind if the ship didn't bank away from the camera since I will probably remove the object anyway, but i'd still like it to be available for multiple views. Anyway, here is the pieces of the code that should be relevant. I'm actually using the GDK, but I can translate since the problem lies in both versions. The entire program is available here http://forum.thegamecreators.com/?m=forum_view&t=169615&b=1, I released it as open source some time ago and am now making changes for a different game altogether.
set display mode 1024,768,16
autocam off
hide mouse
sync on
sync rate 60
backdrop on
`Load the map/skybox
set camera range 2.5,50000
load object "Maps/cielo/cielo.x",666
`position object 666,256,30,0
set object texture 666,2,1
set object light 666,0
set object cull 666,0
yrotate object 666,270
scale object 666,95000,95000,95000
set object collision off 666
`Load the player objects
make object cone 10,25
position object 10,50000+rnd(5000),10000+rnd(5000),50000+rnd(5000)
xrotate object 10,90
fix object pivot 10
hide object 10
`load player
`load object "Ships/Enforcer/fighter1.3ds", OURID
load object "Ships/"+shipname$+"/"+model$,OURID
if textured$<>"1"
load image "Ships/Enforcer/cinfa.jpg", OURID
load image "Ships/"+shipname$+"/"+texture$,OURID
texture object OURID, OURID
endif
xrotate object OURID,-90
scale object OURID,400,400,400
`position object OURID, 50000, 10000, 50000
glue object to limb OURID, 10, 0
load image "Ships/spheremap.jpg",15
set sphere mapping on OURID,15
`navigation
`LEFT/RIGHT
if leftkey()=1 then plyr_turn# = curvevalue(-2, plyr_turn#, 10)
if rightkey()=1 then plyr_turn# = curvevalue(2, plyr_turn#, 10)
if mx# = 0 then plyr_turn# = curvevalue(0, plyr_turn#, 10)
yrotate object 10,wrapvalue(object angle y(10)+plyr_turn#)
`UP/DOWN
if upkey()=1 then plyr_tilt# = curvevalue(1, plyr_tilt#, 20)
if downkey()=1 then plyr_tilt# = curvevalue(-1, plyr_tilt#, 20)
if my# = 0 then plyr_tilt# = curvevalue(0, plyr_tilt#, 10)
xrotate object 10,wrapvalue(object angle x(10)+plyr_tilt#)
`SMOOTH BANKING default 50
if leftkey()=1 then plyr_bank# = curvevalue(50, plyr_bank#, 25)
if rightkey()=1 then plyr_bank# = curvevalue(-50, plyr_bank#, 25)
if mx# = 0 then plyr_bank# = curvevalue(0, plyr_bank#, 25)
yrotate object OURID,plyr_bank#