BIS fnc getPitchBank: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page filling)
Line 1: Line 1:
 
{{Function|Comments=
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2 |= Game name
| arma2 |Game name=


|1.00|= Game version
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>
| Returns the pitch and bank of an object, in degrees. '''Yaw''' can be found using the getdir command.<br />
/************************************************************
Get Pitch and Bank


Parameters: object
'''Pitch''' is 0 when the object is level; 90 when pointing straight up; and -90 when pointing straight down.<br />
Returns: [pitch, bank]


Returns the pitch and bank of an object, in degrees.
'''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.


Yaw can be found using the getdir command.
{{Important|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.}} |Description=
 
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.
************************************************************/
 
 
//extract parameters
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_getPitchBank]]; --> |= Syntax
| object call [[BIS_fnc_getPitchBank]] |Syntax=


|p1= |= Parameter 1
|p1= object: [[Object]] |Parameter 1=


| |= Return value
| [[Array]] of [[Number|Numbers]] - format [pitch, bank] |Return value=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>_pitchBank = [[vehicle]] [[player]] [[call]] [[BIS_fnc_getPitchBank]];</code> |Example 1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[BIS_fnc_setPitchBank]], [[vectorDir]], [[vectorUp]], [[setVectorDirAndUp]] |See also=
 
}}
}}


Line 56: Line 37:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Functions|{{uc:getPitchBank}}]]
[[Category:Function Group: Objects|{{uc:getPitchBank}}]]
[[Category:Function Group: Objects|{{uc:getPitchBank}}]]
[[Category:Functions|{{uc:getPitchBank}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:getPitchBank}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:getPitchBank}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:getPitchBank}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:getPitchBank}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:getPitchBank}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:getPitchBank}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:getPitchBank}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:getPitchBank}}]]

Revision as of 22:48, 30 May 2018

Hover & click on the images for description

Description

Description:
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.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
object call BIS_fnc_getPitchBank
Parameters:
object: Object
Return Value:
Array of Numbers - format [pitch, bank]

Examples

Example 1:
_pitchBank = vehicle player call BIS_fnc_getPitchBank;

Additional Information

See also:
BIS_fnc_setPitchBankvectorDirvectorUpsetVectorDirAndUp

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section