Page MenuHomeFeedback Tracker

Expand terrainIntersect* commands to allow for ignoring sea
New, NormalPublic

Description

I'd like to request expansion of terrainIntersect* commands to include an option to ignore sea surface. I use this command to quickly check if entity is obstructed by the terrain but it also counts sea surface as obstruction which makes it problematic for checks against swimming units and requires me to add special conditions which adds up in per frame execution.

I think that this can be implemented by adding a flag as 3rd argument to all 3 commands:
terrainIntersect [from, to, ignore_sea]
terrainIntersectASL [from, to, ignore_sea]
terrainIntersectAtASL [from, to, ignore_sea]
with ignore_sea being optional and false by default

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Test script to run on Altis:

[
	 terrainIntersectASL [[3921,14964,5], [3830,14979,-5]]
	,terrainIntersect [ASLtoAGL [3921,14964,5], ASLtoAGL [3830,14979,-5]]
	,terrainIntersectAtASL [[3921,14964,5], [3830,14979,-5]] isNotEqualTo [0,0,0]

	,terrainIntersectASL [[3921,14964,5], [3830,14979,-5], true]
	,terrainIntersect [ASLtoAGL [3921,14964,5], ASLtoAGL [3830,14979,-5], true]
	,terrainIntersectAtASL [[3921,14964,5], [3830,14979,-5], true] isNotEqualTo [0,0,0]
]

should return [true, true, true, false, false, false] if such feature existed

Event Timeline

SaMatra created this task.Mar 17 2023, 8:01 AM