BIS fnc weaponDirectionRelative: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>\[\[private\]\] (_?[a-zA-Z0-9_]+) = \[([^\[]*)\] \[\[(call|spawn)\]\] \[\[(BI(N|S)_fnc_[a-zA-Z0-9_]+)\]\];?<\/code>" to "<sqf>private $1 = [$2] $3 $4;</sqf>")
m (Some wiki formatting)
Line 10: Line 10:
|s1= [vehicle, weapon visual] call [[BIS_fnc_weaponDirectionRelative]]
|s1= [vehicle, weapon visual] call [[BIS_fnc_weaponDirectionRelative]]


|p1= vehicle: [[Object]] - vehicle
|p1= vehicle: [[Object]] - vehicle


|p2= weapon: [[String]] - vehicle weapon
|p2= weapon: [[String]] - vehicle weapon


|p3= visual (Optional): [[Boolean]] - if [[true]] - result is in render scope, [[false]] - simulation scope. Default: [[true]]
|p3= visual: [[Boolean]] - (Optional, default [[true]]) if [[true]] - result is in render scope, [[false]] - simulation scope


|r1= ‎[[Array]] in format [x,y,z]
|r1= ‎[[Array]] format [[Vector3D]]


|x1= <sqf>private _relweapondir = [tank, "cannon_105mm"] call BIS_fnc_weaponDirectionRelative;</sqf>
|x1= <sqf>private _relweapondir = [tank, "cannon_105mm"] call BIS_fnc_weaponDirectionRelative;</sqf>

Revision as of 02:04, 1 August 2022

Hover & click on the images for description

Description

Description:
Returns relative direction vector of given weapon for the given vehicle
Execution:
call
Groups:
Weapons

Syntax

Syntax:
[vehicle, weapon visual] call BIS_fnc_weaponDirectionRelative
Parameters:
vehicle: Object - vehicle
weapon: String - vehicle weapon
visual: Boolean - (Optional, default true) if true - result is in render scope, false - simulation scope
Return Value:
Array format Vector3D

Examples

Example 1:
private _relweapondir = [tank, "cannon_105mm"] call BIS_fnc_weaponDirectionRelative;

Additional Information

See also:
BIS_fnc_attachToRelative BIS_fnc_vectorDirAndUpRelative weaponDirection

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