Jump to content
Sign in to follow this  
florianmuellerch

Get Plane bank angle

Recommended Posts

Hi Scripters out there

I'm trying to get the bank angle of a plane, but I didn't find out the best way.

I've read about vectorUp but I didn't really understand the indicators (which vector is this?)

I'm trying to do an ejection seat script, so I'd have to set the velocity of the player in the direction the canopy of the plane points.

Is that somehow possible in an easy way?

Thank you for your help! :)

Regards, Flo

---------- Post added at 08:53 ---------- Previous post was at 08:38 ----------

Just found out :( too bad googling -.-

The answer: BIS_fnc_getPitchBank

Share this post


Link to post
Share on other sites

BIS_fnc_getPitchBank

scriptName "Functions\objects\fn_getPitchBank.sqf";

/************************************************************

Get Pitch and Bank

By Andrew Barron

Parameters: object

Returns: [pitch, bank]

Returns the pitch and bank of an object, in degrees.

Yaw can be found using the getdir command.

Pitch is 0 when the object is level; 90 when pointing straight

up; and -90 when pointing straight down.

Bank is 0 when level; 90 when the object is rolled to the right,

-90 when rolled to the left, and 180 when rolled upside down.

The bank returned by this command is not fully accurate, it

can be off by up to 5% or so (depending on pitch), due to an unknown bug.

************************************************************/

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  

×