ACE3/addons/fortify/functions/fnc_axisLengths.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

27 lines
518 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Kingsley
* Gets the longest axis of the bounding box of the given object.
*
* Arguments:
* 0: Object <OBJECT>
*
* Return Value:
* Lengths <ARRAY>
*
* Example:
* [_object] call ace_fortify_fnc_axisLengths;
*
* Public: Yes
*/
params [["_object", objNull, [objNull]]];
(boundingBoxReal _object) params ["_p1", "_p2"];
[
(abs ((_p2 select 0) - (_p1 select 0))),
(abs ((_p2 select 1) - (_p1 select 1))),
(abs ((_p2 select 2) - (_p1 select 2)))
]