Jump to content

Recommended Posts

Hey just wondering, is there any way to get an I fixed wing pilot, to perform a perfect loop, does anybody have a script for anything like that?

Share this post


Link to post
Share on other sites

thanks worked perfectly, some of the played back paths tho seem a little buggy.

Share this post


Link to post
Share on other sites

I'm sure it could be done in real time, I did look at this a while back and got quite close but it needs a maths genius to make it bug free.

If you want to take a look here it is.

just place this in a waypoint null=[plane] execvm "rotateV1.sqf"

_dir = 0;
_angle = 01;
_pitch = 0;
_maxangle = 360;
_currentangle = 0;

_object = _this select 0;
_dir = getdir _object;


while {_angle != _maxangle} do  {

_vecdx = sin(_dir) * cos(_angle);
_vecdy = cos(_dir) * cos(_angle);
_vecdz = sin(_angle);

_vecux = cos(_dir) * cos(_angle) * sin(_pitch);
_vecuy = sin(_dir) * cos(_angle) * sin(_pitch);
_vecuz = cos(_angle) * cos(_pitch);

_object setVectorDirAndUp [ [_vecdx,_vecdy,_vecdz], [_vecux,_vecuy,_vecuz] ]; 

_angle=_angle+1;

sleep 0.001;
//hint format ["%1",_currentangle];
};
hint "done";

The maths were done by Gigan I just adapted it to the plane.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×