ACE3/addons/common/functions/fnc_translateToWeaponSpace.sqf

30 lines
607 B
Plaintext
Raw Normal View History

2015-09-19 22:55:58 +00:00
/*
* Author: ?
* ?
*
* Arguments:
* ?
*
* Return Value:
* ?
*
* Public: ?
*/
2015-05-14 22:12:40 +00:00
#include "script_component.hpp"
2015-09-19 22:55:58 +00:00
params ["_object", "_matrix", "_offset"];
2015-05-14 22:12:40 +00:00
private _origin = getPosASL _object;
2015-09-19 22:55:58 +00:00
_matrix params ["_xVec", "_yVec", "_zVec"];
_offset = _offset vectorDiff _origin;
2015-09-19 22:55:58 +00:00
_offset params ["_x", "_y", "_z"];
2015-09-19 22:55:58 +00:00
[
((_xVec select 0) * _x) + ((_xVec select 1) * _y) + ((_xVec select 2) * _z),
((_yVec select 0) * _x) + ((_yVec select 1) * _y) + ((_yVec select 2) * _z),
((_zVec select 0) * _x) + ((_zVec select 1) * _y) + ((_zVec select 2) * _z)
] // return