Lazy uh?
use the same model with this:
set display mode 800,600,16
hide mouse
sync on
backdrop on
autocam off
set global collision off
gosub loadship
sync rate 30
set camera range 1,10000
position camera 0,80,-200
point camera 0,0,0
rem ********************MAIN LOOP******************
labelmainloop:
do
gosub control
sync
loop
rem **************** SUBROUTINES ********************
rem ****LOAD SHIP****
rem object 9998
loadship:
load object "testshipplain.x",9998
set object 9998,1,1,0,1,1,1,1
xrotate object 9998,90
fix object pivot 9998
position object 9998,0,0,0
return
control:
rem **TILT LEFT / RIGHT **
if leftkey()=1 then oaz#=wrapvalue(oaz#+0.5)
rotate limb 9998,1,0,0,oaz#
if rightkey()=1 then oaz#=wrapvalue(oaz#-0.5)
rotate limb 9998,1,0,0,oaz#
return
end
Limb 1 ( or limb 0 ) rotation is the only way to keep the object z rotation relative to its own axis (local rotation). zrotate object will use world angles, therefore when going East to West or viceversa, zrotate makes it pitch up or down.