Returns a list of intersections with surfaces and ground from begPosASL to endPosASL. Doesn't return intersection with sea surface. Works underwater, unlike lineIntersects. Hardcoded max distance: 5000m.
Important
if begPosASL is under the ground and endPosASL is above it, the command will only return intersection with the ground, this is an engine limitation and none of the intersectXXX commands will work when initiated from under the ground.
only a single LOD is checked for intersection. LOD2 will only be checked if LOD1 is unavailable.
Since Arma 3 v2.20, there is an alternative syntax that does multiple checks in parallel, faster than multiple calls.
ignoreObj1: Object - (Optional, default objNull) first object to ignore
ignoreObj2: Object - (Optional, default objNull) second object to ignore
sortMode: Boolean - (Optional, default true) true: closest to furthest, false: furthest to closest
maxResults: Number - (Optional, default 1) max results to return. -1 to return every result
LOD1: String - (Optional, default "VIEW") primary LOD to look for intersection. Can be one of:
"FIRE"
"VIEW"
"GEOM"
"IFIRE" - ("I" stands for Indirect, almost identical to "FIRE")
"NONE"
Arma 3 v2.02 "PHYSX" - PhysX geometry LOD
Arma 3 v2.08 "ROADWAY" - only works from the top (since arma3 1.52)
LOD2: String - (Optional, default "FIRE") secondary LOD to look for intersection. See LOD1 for possible values (since arma3 1.52)
returnUnique: Boolean - (Optional, default true) when false, all intersections in the same object are included, otherwise only the first one (since arma3 1.70)
Returns:Array of Arrays with [intersectPosASL, surfaceNormal, intersectObj, parentObject, selectionNames, pathToBisurf]
intersectPosASL: PositionASL - the actual position where line intersects surface
intersectObject: Object - the object the surface belongs to (could be proxy object) - objNull if terrain
parentObject: Object - the object proxy object belongs to (not always the same as intersect object) - objNull if terrain
Arma 3 v2.10 selectionNames: Array of Strings - Names of the intersected selections (bones). Returns [] if there is no intersection with a selection.
Arma 3 v2.10 pathToBisurf: String - path to intersected surface properties (.bisurf) file. Returns "" if surface has no special properties. Terrain surface properties begin with 1., and the surface properties are defined in CfgSurfaces. For example, if it returns 1. GdtVRsurface01, properties are defined in: configFile >> "CfgSurfaces" >> "GdtVRsurface01"
intersectObject: Object - the object the surface belongs to (could be proxy object) - objNull if terrain
parentObject: Object - the object proxy object belongs to (not always the same as intersect object) - objNull if terrain
selectionNames: Array of Strings - Names of the intersected selections (bones). Returns [] if there is no intersection with a selection.
pathToBisurf: String - path to intersected surface properties (.bisurf) file. Returns "" if surface has no special properties. Terrain surface properties begin with 1., and the surface properties are defined in CfgSurfaces. For example, if it returns 1. GdtVRsurface01, properties are defined in: configFile >> "CfgSurfaces" >> "GdtVRsurface01"
This command is useful to place weaponholder (and then spawned weapons) on floor of houses, correcting the spawn position (can_collide) to intersect with floor: