Created
January 20, 2018 15:51
-
-
Save jameslkingsley/5c56f5941ac1af8ba92fb66fefb1bd30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARC_drawOnMap = { | |
if (!isServer) exitWith {}; | |
params [ | |
["_object", objNull, [objNull]], | |
["_color", "ColorBlack", [""]], | |
["_alpha", 0.75, [0.00]] | |
]; | |
private _box = boundingBoxReal _object; | |
private _pos = getPos _object; | |
private _uname = format ["bounding_box_marker_%1", str _pos]; | |
private _marker = createMarker [_uname, _pos]; | |
_marker setMarkerPos _pos; | |
_marker setMarkerBrush "Solid"; | |
_marker setMarkerShape "RECTANGLE"; | |
_marker setMarkerColor _color; | |
_marker setMarkerAlpha _alpha; | |
_marker setMarkerDir (getDir _object); | |
_marker setMarkerSize [ | |
(_object modelToWorldVisual (_box select 0)) distance (_object modelToWorldVisual [(_box select 1 select 0), (_box select 0 select 0), (_box select 0 select 0)]), | |
(_object modelToWorldVisual (_box select 0)) distance (_object modelToWorldVisual [(_box select 0 select 0), (_box select 0 select 0), (_box select 1 select 2)]) | |
]; | |
nil | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment