{"name":"BIS_fnc_getIntersectionsUnderCursor","operator":null,"title":"BIS fnc getIntersectionsUnderCursor","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_getIntersectionsUnderCursor","revid":336299,"updated":"2022-12-21T11:10:09Z","groups":["Geometry"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.00"}],"since":{"game":"arma3","name":"Arma 3","version":"1.00"},"arma3_since":"1.00","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns intersections under cursor. For more information see lineIntersectsSurfaces.","syntaxes":[{"syntax":"[screenX, screenY, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2] call BIS_fnc_getIntersectionsUnderCursor","since":null,"effect":null,"exec":null,"params":[{"name":"screenX","type":"Number","optional":true,"default":"0","description":"cursor's X position - see screenToWorld","types":["Number"],"since":null,"text":"screenX: Number - (Optional, default 0) cursor's X position - see screenToWorld"},{"name":"screenY","type":"Number","optional":true,"default":"0","description":"cursor's Y position - see screenToWorld","types":["Number"],"since":null,"text":"screenY: Number - (Optional, default 0) cursor's Y position - see screenToWorld"},{"name":"ignoreObj1","type":"Object","optional":true,"default":"objNull","description":"first object to ignore","types":["Object"],"since":null,"text":"ignoreObj1: Object - (Optional, default objNull) first object to ignore"},{"name":"ignoreObj2","type":"Object","optional":true,"default":"objNull","description":"second object to ignore","types":["Object"],"since":null,"text":"ignoreObj2: Object - (Optional, default objNull) second object to ignore"},{"name":"sortMode","type":"Boolean","optional":true,"default":"true","description":"true: closest to furthest, false: furthest to closest","types":["Boolean"],"since":null,"text":"sortMode: Boolean - (Optional, default true) true: closest to furthest, false: furthest to closest"},{"name":"maxResults","type":"Number","optional":true,"default":"1","description":"max results to return. -1 to return every result","types":["Number"],"since":null,"text":"maxResults: Number - (Optional, default 1) max results to return. -1 to return every result"},{"name":"LOD1","type":"String","optional":true,"default":"\"VIEW\"","description":"primary LOD to look for intersection. Can be one of:\n- \"FIRE\"\n- \"VIEW\"\n- \"GEOM\"\n- \"IFIRE\" - (\"I\" stands for Indirect, *almost* identical to \"FIRE\")\n- \"NONE\"\n- Arma 3 v2.02 \"PHYSX\" - PhysX geometry LOD\n- Arma 3 v2.08 \"ROADWAY\" - only works from the top","types":["String"],"since":"arma3 1.52","text":"LOD1: String - (Optional, default \"VIEW\") primary LOD to look for intersection. Can be one of:\n- \"FIRE\"\n- \"VIEW\"\n- \"GEOM\"\n- \"IFIRE\" - (\"I\" stands for Indirect, *almost* identical to \"FIRE\")\n- \"NONE\"\n- Arma 3 v2.02 \"PHYSX\" - PhysX geometry LOD\n- Arma 3 v2.08 \"ROADWAY\" - only works from the top"},{"name":"LOD2","type":"String","optional":true,"default":"\"FIRE\"","description":"secondary LOD to look for intersection. See *LOD1* for possible values","types":["String"],"since":"arma3 1.52","text":"LOD2: String - (Optional, default \"FIRE\") secondary LOD to look for intersection. See *LOD1* for possible values"}],"returns":{"type":"Array of intersections in format [[intersectPosASL, surfaceNormal, intersectObj, parentObject, selectionNames, pathToBisurf], ...] where:","types":["Array"],"description":"intersectPosASL: PositionASL - the actual position where line intersects surface - surfaceNormal: Vector - a normal to the intersected 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\"`","text":"Array of intersections in format [[intersectPosASL, surfaceNormal, intersectObj, parentObject, selectionNames, pathToBisurf], ...] where:\n- intersectPosASL: PositionASL - the actual position where line intersects surface\n- surfaceNormal: Vector - a normal to the intersected surface\n- intersectObject: Object - the object the surface belongs to (could be proxy object) - objNull if terrain\n- parentObject: Object - the object proxy object belongs to (not always the same as intersect object) - objNull if terrain\n- Arma 3 v2.10 selectionNames: Array of Strings - Names of the intersected selections (bones). Returns `[]` if there is no intersection with a selection.\n- 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\"`"}}],"examples":[{"text":"```sqf\n[0.5, 0.5, player, objNull, true, \"VIEW\"] call BIS_fnc_getIntersectionsUnderCursor;\n```","code":["[0.5, 0.5, player, objNull, true, \"VIEW\"] call BIS_fnc_getIntersectionsUnderCursor;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["lineIntersectsSurfaces"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Geometry","Functions","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}