Search the Community
Showing results for tags 'lineintersectssurfaces'.
Found 3 results
-
HI All, I'm trying to get the a laserTarget on a soldier with a player or AI user the Laser Designator to target units. The laserTarget appears on all units, including soldiers in static weapons but passes through all other soldiers. #1) Any advise on creating a laserTarget attachedTo a soldier and deleting working around removing the one that passes through the soldier? Here is the script I'm using for creating a laser line and laserTarget. params ["_startObject"]; if (isNull _startObject) exitwith {}; ["laser", "onEachFrame", { params ["_startObject"]; //if (currentVisionMode _startObject == 1) exitwith {}; _designatedObj = laserTarget _startObject; if !(isNull _designatedObj) then { _lasercolour = [1,0,0,1.5-sunOrmoon]; // first 3 numbers are RGB _range = 2500; // laser range _maxsize = 5; _start = ASLToAGL eyePos _startObject; _end = getPos _designatedObj; _int = lineIntersectsSurfaces [atltoasl _start, atltoasl _end, _startObject, _designatedObj, true, 1, "VIEW", "GEOM"]; _size = _maxsize; //hintSilent format ["_int: %1", _int]; if !(_int isEqualTo []) then { _end = (_int select 0) select 0; _end = asltoagl _end; _length = _start vectorDistance _end; systemchat format ["_length: %1 _int: %2 ", round _length, typeOf ((_int select 0) select 2)]; if (_length >= _range) then { _size = 0; } else { _size = _maxsize; }; if (_length < 1) then {_size = 0}; } else { _length = _start vectorDistance _end; systemchat format ["_length: %1", round _length]; }; drawLine3D [_start, _end, _lasercolour]; // comment this out to remove the line drawIcon3D ["\a3\data_f\car_light_flare2.paa", _lasercolour, _end, _size, _size, random 360, "", 0, 0.05, "PuristaMedium"]; },[_startObject]] call BIS_fnc_addStackedEventHandler; #2) ALSO, Is there a way to make the actual laserTarget generated from the laser designator visible in daylight. I would like to use it instead if I can as it scales in size with distance appropriately? I've tried playing with setLightIntensity, setLightBrightness, setLightColor and setLightDayLight but had not luck. thanks
-
LODs and lineIntersectsSurfaces Question
ZaellixA posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey all, I have been messing around with lineIntersectsSurfaces command in order to check for visibility between two units. I can't really say I had problems making it work, but even after having a look at both LOD's and command's Wikis I can't really say I have understood what LODs are exactly and how they can be utilized in various different scenarios. For example, what will the difference be if I call lineIntersectsSurfaces with "VIEW" and "FIRE" (which are the default) as LOD1 and LOD2 respectively or with "GEOM" and "VIEW" for LODs? I understand that this may (or may not) be quite a long subject to cover in just a forum post, so any additional information is most welcome (whether a link to a text, a short or long explanation, etc.). Best to all and thanks in advance, Achilles.- 7 replies
-
- lod
- lineintersectssurfaces
-
(and 2 more)
Tagged with:
-
What I want to know is if there is a simple command to check if point A has a line of sight to point B ?
- 20 replies
-
- LOS
- line of sight
-
(and 4 more)
Tagged with: