BIS fnc getPitchBank: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "Numbers" to "Numbers")
 
(41 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma2
____________________________________________________________________________________________
|version1= 1.00


| arma2 |= Game name
|game2= arma2oa
|version2= 1.50


|1.00|= Game version
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| <pre>
|game4= arma3
/************************************************************
|version4= 0.50
Get Pitch and Bank


Parameters: object
|gr1= Object Manipulation
Returns: [pitch, bank]


Returns the pitch and bank of an object, in degrees.
|arg= global


Yaw can be found using the getdir command.
|descr= 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>
'''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.


Pitch is 0 when the object is level; 90 when pointing straight
{{Feature|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.}}
up; and -90 when pointing straight down.


Bank is 0 when level; 90 when the object is rolled to the right,
|s1= object call [[BIS_fnc_getPitchBank]]
-90 when rolled to the left, and 180 when rolled upside down.


The bank returned by this command is not fully accurate, it
|p1= object: [[Object]]
can be off by up to 5% or so (depending on pitch), due to an unknown bug.
************************************************************/


|r1= [[Array]] of [[Number]]s - format [pitch, bank]


//extract parameters
|x1= <sqf>private _pitchBank = vehicle player call BIS_fnc_getPitchBank;</sqf>
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
 
| <!-- [] call [[BIS_fnc_getPitchBank]]; --> |= Syntax
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[BIS_fnc_setPitchBank]] [[vectorDir]] [[vectorUp]] [[setVectorDirAndUp]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Objects|{{uc:getPitchBank}}]]
[[Category:Functions|{{uc:getPitchBank}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:getPitchBank}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:getPitchBank}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:getPitchBank}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:getPitchBank}}]]

Latest revision as of 23:38, 12 July 2022

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:
Object Manipulation

Syntax

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

Examples

Example 1:
private _pitchBank = vehicle player call BIS_fnc_getPitchBank;

Additional Information

See also:
BIS_fnc_setPitchBank vectorDir vectorUp setVectorDirAndUp

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