BIS fnc getPitchBank: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Add Argument Effect Global and getDir link)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Function|Comments=
____________________________________________________________________________________________


{{Function|= Comments
| arma2 |Game name=
____________________________________________________________________________________________


| arma2 |= Game name
|1.00|Game version=


|1.00|= Game version
|arg= global |arguments=
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>
| Returns the pitch and bank of an object, in degrees. '''Yaw''' can be found using the [[getDir]] command.<br />
/************************************************************
'''Pitch''' is 0 when the object is level; 90 when pointing straight up; and -90 when pointing straight down.<br />
Get Pitch and Bank
'''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.
 
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.
************************************************************/
 


//extract parameters
{{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=
</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 23:50, 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