BIS_fnc_rotateVector2D
Jump to navigation
Jump to search
Description
- Description:
/************************************************************ Rotate 2D Vector Parameters: [[vector], angle] Returns: [vector] This function returns a 2D vector rotated a specified number of degrees around the origin. ************************************************************/
(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- Syntax needed
- Return Value:
- Return value needed
Examples
- Example 1:
Additional Information
- See also:
- See also needed
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
- Posted on January 21, 2015 - 14:15 (UTC)
- AgentRevolution
-
Be careful when using this function in conjunction with getDir or BIS_fnc_dirTo; they return a clockwise angle, while the rotation is done counterclockwise (mathematically correct).
To counter this, simply negate their output:[[0,1,0], -(getDir _object)] call BIS_fnc_rotateVector2D;
[[0,1,0], -([_unit, _vehicle] call BIS_fnc_dirTo)] call BIS_fnc_rotateVector2D;