intersect: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (AGL) |
Killzone Kid (talk | contribs) (format) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | Finds named selections in object which are in specified LOD, intersected by given section of a line. Return value is in the form of [selection, distance]. Multiple returned arrays are nested within a single array. No intersection returns []. ''lodName'' could be one of the following: | ||
Return value is in the form of [selection, | |||
* "FIRE" | * "FIRE" | ||
* "VIEW" | * "VIEW" | ||
Line 16: | Line 14: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [object, lodName] '''intersect''' [ | | [object, lodName] '''intersect''' [begPos, endPos] |= Syntax | ||
|p1= [object, lodName]: [[Array]] |= Parameter 1 | |p1= [object, lodName]: [[Array]] |= Parameter 1 | ||
|p2= object: [[Object]] |= Parameter 2 | |p2= object: [[Object]] |= Parameter 2 | ||
|p3= lodName: [[String]] |= Parameter 3 | |p3= lodName: [[String]] |= Parameter 3 | ||
|p4= [ | |p4= [begPos, endPos] : [[Array]] |= Parameter 4 | ||
|p5= | |p5= begPos: [[Array]] - format [[PositionAGL]] |= Parameter 5 | ||
|p6= | |p6= endPos: [[Array]] - format [[PositionAGL]] |= Parameter 6 | ||
| [[Array]] |= Return value | | [[Array]] - array of intersections in format: <nowiki>[</nowiki>[selection, distance],...], where | ||
* selection - name of intersected selection | |||
* distance - distance from begPos | |||
The results are also sorted, closest selection first |= Return value | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 12:41, 17 August 2015
Description
- Description:
- Finds named selections in object which are in specified LOD, intersected by given section of a line. Return value is in the form of [selection, distance]. Multiple returned arrays are nested within a single array. No intersection returns []. lodName could be one of the following:
- "FIRE"
- "VIEW"
- "GEOM"
- "IFIRE" - ("I" stands for Indirect, almost the same as FIRE)
- Groups:
- Uncategorised
Syntax
- Syntax:
- [object, lodName] intersect [begPos, endPos]
- Parameters:
- [object, lodName]: Array
- object: Object
- lodName: String
- [begPos, endPos] : Array
- begPos: Array - format PositionAGL
- endPos: Array - format PositionAGL
- Return Value:
- Array - array of intersections in format: [[selection, distance],...], where
- selection - name of intersected selection
- distance - distance from begPos
Examples
- Example 1:
[_tank, "VIEW"] intersect [[1500, 1500, 2], [1550, 1500, 2]]
Additional Information
- See also:
- lineIntersectsSurfacesterrainIntersectterrainIntersectASLlineIntersectslineIntersectsWithlineIntersectsObjs
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
- Posted on Jul 25, 2007 - 08:37
- ManDay
- The most common LOD is "FIRE", which identifies the most detailled hitbox used for ammunition.
- Posted on Mar 27, 2014 - 14:52
- ffur2007slx2_5
-
Example (In ArmA3 ver 1.14) display returned arrays on cursor entities:
Sto = []; Fn = { { Sto set [_foreachindex,[cursortarget,_x] intersect [(asltoagl (eyepos player)),(screentoworld [0.5,0.5])]]; } foreach ["FIRE","VIEW","GEOM","IFIRE"]; hintsilent format ["FIRE: %1, VIEW: %2, GEOM: %3, IFIRE: %4",Sto select 0,Sto select 1,Sto select 2,Sto select 3]; }; ["sample_id","onEachFrame","Fn"] call BIS_fnc_addStackedEventHandler;
Return FIRE: [something], VIEW: [something], GEOM: [something], IFIRE: [something].