BIS fnc getPitchBank: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma2 | | arma2 | ||
|1.00 | |1.00 | ||
|gr1 = Object Manipulation | |gr1 = Object Manipulation | ||
|arg= global |arguments= | |arg= global |arguments= | ||
Line 13: | Line 13: | ||
'''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. | '''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. | ||
{{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.}} | {{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.}} | ||
| object call [[BIS_fnc_getPitchBank]] | | object call [[BIS_fnc_getPitchBank]] | ||
|p1= object: [[Object]] | |p1= object: [[Object]] | ||
| [[Array]] of [[Number|Numbers]] - format [pitch, bank] | | [[Array]] of [[Number|Numbers]] - format [pitch, bank] | ||
|x1= <code>_pitchBank = [[vehicle]] [[player]] [[call]] [[BIS_fnc_getPitchBank]];</code> | |x1= <code>_pitchBank = [[vehicle]] [[player]] [[call]] [[BIS_fnc_getPitchBank]];</code> | ||
| [[BIS_fnc_setPitchBank]], [[vectorDir]], [[vectorUp]], [[setVectorDirAndUp]] | | [[BIS_fnc_setPitchBank]], [[vectorDir]], [[vectorUp]], [[setVectorDirAndUp]] | ||
}} | }} | ||
Revision as of 00:03, 18 January 2021
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. - 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:
_pitchBank = vehicle player call BIS_fnc_getPitchBank;
Additional Information
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