Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:2.00

Description

Description:Returns the objects intersecting with a virtual line between two positions. See lineIntersects for details.

Syntax

Syntax:lineIntersectsWith [start, end, objIgnore1, objIgnore2, sortByDist, considerSnow]
Parameters:
  • start: PositionASL - Start position of calculated line.
  • end: PositionASL End position of calculated line.
  • objIgnore1: Object - First object to ignore (optional, default: objNull).
  • objIgnore2: Object - Second object to ignore (optional, default: objNull).
  • sortByDist: Boolean - Sort intersecting objects by distance (furthest to closest) (optional, default: false - unordered).
  • considerSnow: Boolean - Whether snow should be treated as terrain, and stop collision checks (optional, default: false) (V3.3+).
Return Value:Array - Intersecting objects or vehicles (units are ignored).

Examples

Examples:
_objects = lineIntersectsWith [eyePos tank1, aimPos chopper, tank1, chopper]

Additional Information

See also: lineIntersects, terrainIntersect
Multiplayer: 
Problems:The considerSnow option only considers snow on the ground, but not on buildings.

Notes