BIS fnc rotateVector3D: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
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 | ||
| arma3 | | arma3 | ||
|1.00 | |1.00 | ||
|gr1= Vectors | |gr1= Vectors | ||
| Rotates the vector around the given axis by the given angle | | Rotates the vector around the given axis by the given angle | ||
|[vector, angle, axis] call [[BIS_fnc_rotateVector3D]] | |[vector, angle, axis] call [[BIS_fnc_rotateVector3D]] | ||
|p1= [vector, angle, axis]: [[Array]] | |p1= [vector, angle, axis]: [[Array]] | ||
|p2= vector: [[Array]] - given vector in format [[Vector3D]] | |p2= vector: [[Array]] - given vector in format [[Vector3D]] | ||
|p3= angle: [[Number]] - given angle (taken in the opposite direction to the one defined by the [https://en.wikipedia.org/wiki/Right-hand_rule right hand rule]) | |p3= angle: [[Number]] - given angle (taken in the opposite direction to the one defined by the [https://en.wikipedia.org/wiki/Right-hand_rule right hand rule]) | ||
|p4= axis: [[Number]] - rotation axis: | |p4= axis: [[Number]] - rotation axis: | ||
* 0 - '''X''' axis | * 0 - '''X''' axis | ||
* 1 - '''Y''' axis | * 1 - '''Y''' axis | ||
* 2 - '''Z''' axis | * 2 - '''Z''' axis | ||
|[[Array]] - rotated vector in format [[Vector3D]] | |[[Array]] - rotated vector in format [[Vector3D]] | ||
|x1= <code> [<nowiki/>[[vectorDir]] [[player]], 90, 2] [[call]] [[BIS_fnc_rotateVector3D]];</code> | |x1= <code> [<nowiki/>[[vectorDir]] [[player]], 90, 2] [[call]] [[BIS_fnc_rotateVector3D]];</code> | ||
| [[BIS_fnc_transformVectorDirAndUp]], [[BIS_fnc_rotateVector2D]] | | [[BIS_fnc_transformVectorDirAndUp]], [[BIS_fnc_rotateVector2D]] | ||
}} | }} | ||
[[Category:Functions|{{uc:rotateVector3D}}]] | [[Category:Functions|{{uc:rotateVector3D}}]] | ||
[[Category:{{Name|arma3}}: Functions|{{uc:rotateVector3D}}]] | [[Category:{{Name|arma3}}: Functions|{{uc:rotateVector3D}}]] |
Revision as of 23:46, 17 January 2021
Description
- Description:
- Rotates the vector around the given axis by the given angle
- Execution:
- call
- Groups:
- Vectors
Syntax
- Syntax:
- [vector, angle, axis] call BIS_fnc_rotateVector3D
- Parameters:
- [vector, angle, axis]: Array
- vector: Array - given vector in format Vector3D
- angle: Number - given angle (taken in the opposite direction to the one defined by the right hand rule)
- axis: Number - rotation axis:
- 0 - X axis
- 1 - Y axis
- 2 - Z axis
- Return Value:
- Array - rotated vector in format Vector3D
Examples
- Example 1:
[vectorDir player, 90, 2] call BIS_fnc_rotateVector3D;
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