oops forgot to add the demo ...here it is
Rem Project: ship rolling Demo
Rem Created: 14/05/2010
autocam off
set camera range 0,1,5000
color backdrop 0
position camera 500,200,0
make object box 1,150,50,50
make object plane 2,10,10 ; hide object 2
make object cube 3,10 ; hide object 3
make object cube 4,50 ; color object 4,rgb(5,255,0)
rem rotate all objects the same way
rotate object 1,object angle x(3),object angle y(3),object angle z(3)
rotate object 2,object angle x(3),object angle y(3),object angle z(3)
point camera 0,0,0,0
make mesh from object 1,2
do
rem rotate the ship the same x,y as the plane
point object 1,object position x(2),object position y(2),object position z(2)
rem rotate the plane y axis to the pointing cube y axis slowly
if wrapvalue(object angle y(2)-object angle y(3)) > 180
yrotate object 2,object angle y(2)+.1
else
yrotate object 2,object angle y(2)-.1
endif
if wrapvalue(object angle x(2)-object angle x(3)) > 180
xrotate object 2,object angle x(2)+.1
else
xrotate object 2,object angle x(2)-.1
endif
rem the roll bit
if wrapvalue(object angle y(1)-object angle y(2)) > 0
roll object right 1,0
endif
if wrapvalue(object angle y(1)-object angle y(2)) > 90
roll object right 1,5
endif
if wrapvalue(object angle y(1)-object angle y(2)) > 180
roll object right 1,10
endif
if wrapvalue(object angle y(1)-object angle y(2)) > 320
roll object right 1,15
endif
rem place the ship on the plane position
position object 1,object position x(2),object position y(2),object position z(2)
rem place the pointing cube on the plane position
position object 3,object position x(2),object position y(2),object position z(2)
rem point the pointing cube to the waypoint cube
point object 3,object position x(4),object position y(4),object position z(4)
rem move the plane
move object 2,1
if spacekey() > 0 then position object 4,camera position x(0),camera position y(0),camera position z(0)
control camera using arrowkeys 0,5,.1
loop
ok i forgot about glue object to limb which will work , just a matter of me making the roll look realistic now , ifeel like im learning stuff when i can solve my own posts b4 i get some responces