Grumpy Old Man 3540 Posted February 19, 2018 50 minutes ago, draoth said: If so how? You mean some kind of center position of multiple positions? Just handle positions as vectors, add all of them together then divide by the amount of vectors: _array = [position1,position2,position3];//your array holding positions _getcenterposition = [0,0,0]; { _getcenterposition = _x vectorAdd _getcenterposition; } foreach _array; _vectorcount = count _array; _getcenterposition params ["_centerX","_centerY","_centerZ"]; _center = [(_centerX / _vectorcount),(_centerY / _vectorcount),(_centerZ / _vectorcount)]; Cheers 5 Share this post Link to post Share on other sites
fn_Quiksilver 1633 Posted February 20, 2018 15 hours ago, Grumpy Old Man said: You mean some kind of center position of multiple positions? Just handle positions as vectors, add all of them together then divide by the amount of vectors: _array = [position1,position2,position3];//your array holding positions _getcenterposition = [0,0,0]; { _getcenterposition = _x vectorAdd _getcenterposition; } foreach _array; _vectorcount = count _array; _getcenterposition params ["_centerX","_centerY","_centerZ"]; _center = [(_centerX / _vectorcount),(_centerY / _vectorcount),(_centerZ / _vectorcount)]; Cheers Heres a universal method in arma to calculate centroid https://github.com/auQuiksilver/Apex-Framework/blob/master/Apex_framework.terrain/code/functions/fn_geomPolygonCentroid.sqf example use: _positions = [ [0,0,0], [1000,0,0], [1000,1000,0], [0,1000,0] ]; _centroid = _positions call QS_fnc_geomPolygonCentroid; 3 1 1 Share this post Link to post Share on other sites