mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
27 lines
515 B
Plaintext
27 lines
515 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)))
|
||
|
]
|