1.In editor, place a player
2. Set initline:
nul = execVM "scanner.sqf";
3. create script "scanner.sqf"
[code]
while {true} do
{
_sResults = objnull;
_wPos = screenToWorld [0.5,0.5];
_sResults = lineIntersectsWith [ATLtoASL positionCameraToWorld [0,0,0], ATLtoASL _wPos, player, objnull, true];
hint str _sResults;
sleep 0.1;
};
[/code]
4. Place some objects like cars, players, buildings etc
5. Point at an infantryman, and you wont get any result. Point at anything else placed in the editor, you'll get a result.