This is where the beauty of using pivot objects or limbs as pivot points comes into play.
You could use glue object, and glue an object to another object that is fixed to the camera. You can then rotate the glued object independently. Or, you could use limbs to the same effect. I prefer to us limbs because the glue object command can be quirky in many situations.
Here's some code quickly knocked together to show the process. The controls are a little lacking, but you could make those whatever you want; the concept is still sound. The main object is positioned and oriented to the camera. A limb (the ship) is offset ahead of the main object. The main object is rotated with the camera's x and y angles. The ship is then allowed to roll and bank by rotating the limb's z axis.
Use < > to decrease or increase speed
UP Down arrows to pitch up or down
left right arrows to bank and turn
move mouse left or right to roll (though I didn't account for the influence of banking here)
set display mode 800,600,32
sync on
sync rate 60
autocam off
hide mouse
gosub _init
speed#=3
do
gosub _move_object
sync
loop
end
_init:
rem make a matrix for reference
make matrix 1,5000,5000,25,25
rem make a pivot that the ship'll rotate on
make object plain 1,1,1
rem make a cone and squish it, tilt it like it's a ship
make object cone 2,20
scale object 2,100,100,20
make mesh from object 2,2
delete object 2
make object 2,2,0
rotate limb 2,0,90,0,0
make mesh from object 2,2
delete object 2
rem add the ship as a limb to the pivot
add limb 1,1,2
delete mesh 2
rem offset the limb so it's a distance in front
offset limb 1,1,0,-10,60
rem set the pivot to the camera rotation order
set object rotation zyx 1
return
_move_object:
rem move the camera around, place the pivot at the camera
rem and orient the pivot according to the camera's orientation
rem control speed - use < > keys
inc speed#,(keystate(52)-keystate(51))*.2
if speed# > 30 then speed#=30
if speed# < -30 then speed#=-30
move camera speed#
rem control camera rotation
`xrotate camera wrapvalue(camera angle x() + (upkey()-downkey()))
`yrotate camera wrapvalue(camera angle y() + (rightkey()-leftkey()))
pitch camera down (upkey()-downkey())
turn camera right (rightkey()-leftkey())
rem add a little banking to a turn
if rightkey()
rotate limb 1,1,0,0,curveangle(290,limb angle z(1,1),20)
endif
if leftkey()
rotate limb 1,1,0,0,curveangle(70,limb angle z(1,1),20)
endif
if rightkey()=0 and leftkey()=0
rotate limb 1,1,0,0,curveangle(0,limb angle z(1,1),20)
endif
rem position and rotate the pivot
position object 1,camera position x(),camera position y(),camera position z()
set object to camera orientation 1
rem control the roll of the ship with the mouse
rotate limb 1,1,0,0,wrapvalue(limb angle z(1,1)-mousemovex())
return
Enjoy your day.