---
name: "BIS_fnc_getIntersectionsUnderCursor"
type: function
status: ok
groups: ["Geometry"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_getIntersectionsUnderCursor
revid: 336299
updated: 2022-12-21T11:10:09Z
---

# BIS_fnc_getIntersectionsUnderCursor

*Function · Geometry · Arma 3 v1.00*

## Description

Returns intersections under cursor. For more information see [lineIntersectsSurfaces](../commands/lineIntersectsSurfaces.md).

## Syntax

```sqf
[screenX, screenY, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2] call BIS_fnc_getIntersectionsUnderCursor
```

**Parameters:**

- `screenX`: [Number](../topics/Number.md) - (Optional, default 0) cursor's X position - see [screenToWorld](../commands/screenToWorld.md)
- `screenY`: [Number](../topics/Number.md) - (Optional, default 0) cursor's Y position - see [screenToWorld](../commands/screenToWorld.md)
- `ignoreObj1`: [Object](../topics/Object.md) - (Optional, default [objNull](../commands/objNull.md)) first object to ignore
- `ignoreObj2`: [Object](../topics/Object.md) - (Optional, default [objNull](../commands/objNull.md)) second object to ignore
- `sortMode`: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) [true](../commands/true.md): closest to furthest, [false](../commands/false.md): furthest to closest
- `maxResults`: [Number](../topics/Number.md) - (Optional, default 1) max results to return. -1 to return every result
- `LOD1`: [String](../topics/String.md) - (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](../topics/String.md) - (Optional, default "FIRE") secondary LOD to look for intersection. See *LOD1* for possible values *(since arma3 1.52)*

**Returns:** [Array](../topics/Array.md) of intersections in format [[intersectPosASL, surfaceNormal, intersectObj, parentObject, selectionNames, pathToBisurf], ...] where:
- intersectPosASL: [PositionASL](../topics/Position.md) - the actual position where line intersects surface
- [surfaceNormal](../commands/surfaceNormal.md): [Vector](../topics/Vector3D.md) - a normal to the intersected surface
- intersectObject: [Object](../topics/Object.md) - the object the surface belongs to (could be proxy object) - [objNull](../commands/objNull.md) if terrain
- parentObject: [Object](../topics/Object.md) - the object proxy object belongs to (not always the same as intersect object) - [objNull](../commands/objNull.md) if terrain
- Arma 3 v2.10 [selectionNames](../commands/selectionNames.md): [Array](../topics/Array.md) of [String](../topics/String.md)s - Names of the intersected selections (bones). Returns `[]` if there is no intersection with a selection.
- Arma 3 v2.10 pathToBisurf: [String](../topics/String.md) - 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"`

## Examples

### Example 1

```sqf
[0.5, 0.5, player, objNull, true, "VIEW"] call BIS_fnc_getIntersectionsUnderCursor;
```

## See also

[lineIntersectsSurfaces](../commands/lineIntersectsSurfaces.md)

<sub>Source: [BI Community Wiki — BIS fnc getIntersectionsUnderCursor](https://community.bistudio.com/wiki/BIS_fnc_getIntersectionsUnderCursor) (revision 336299).</sub>
