plane physics help here by Muncher14th Sep 2005 11:19
|
---|
Summary A little bit of help on the physics Description 9.8 stands for the acceleration of gravity in meters per second. lift is the lift generated by the planes velocity, headwind helps too, but slows down plane. don't yrotate plane, looks funky. zrotation and then pulling upwards does the trick. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com load object "plane.x",1 make matrix 1,5000,5000 do rem t is throttle t=0 rem goes forward however far the throttle is set x=x+t if shiftkey()=1 and t> 100 then t=t+1 if controlkey()=1 and t< 0then t=t-1 if upkey()=1 then xrotate object 1,1 if downkey()=1 then xrotate object 1,-1 if leftkey()=1 then zrotate object 1,1 if rightkey()=1 then zrotate object 1,-1 Y# = object position y(1) - 9.8 + lift loop |