Page MenuHomeFeedback Tracker

LineIntersectsSurfaces returnUnique parameter does not work for terrain
New, NormalPublic

Description

While it works for multiple intersects with objects, it does not work for terrain.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Script used to test:

{
    deleteVehicle _x;
} forEach (missionNamespace getVariable ["arrows",[]]);
arrows = [];

_ins = lineIntersectsSurfaces [
    AGLToASL positionCameraToWorld [0,0,1000], 
    AGLToASL positionCameraToWorld [0,0,0], 
    player,
    objNull,
    true,
    -1,
    "VIEW",
    "FIRE",
    false
];

_ins append lineIntersectsSurfaces [
    AGLToASL positionCameraToWorld [0,0,0], 
    AGLToASL positionCameraToWorld [0,0,1000], 
    player,
    objNull,
    true,
    -1,
    "VIEW",
    "FIRE",
    false
];

{
    private _arrow = (selectRandom ["Sign_Arrow_Large_F","Sign_Arrow_Large_Green_F","Sign_Arrow_Large_Blue_F","Sign_Arrow_Large_Pink_F","Sign_Arrow_Large_Yellow_F","Sign_Arrow_Large_Cyan_F"]) createVehicle [0,0,0];
    _x params ["_asl","_norm","_obj","_parentObj"];
    
    _arrow setPosASL _asl;
    _arrow setVectorUp _norm;
    arrows pushBack _arrow;
    
    systemChat str _asl;
} forEach _ins;

count _ins

Execute in debug console while looking through two or more hills, ideally in spectator.

Markers will only be placed at the first intersections with terrain, and any objects.

Event Timeline

Freddo3000 edited Steps To Reproduce. (Show Details)
Freddo3000 edited Steps To Reproduce. (Show Details)