Closed bux closed 10 years ago
Engine limitation.
I have no idea if this would work and it's probably a terrible idea, maybe createVehicleLocal some object and "shoot it" along the path checking for EPEContactStart?
It could be feasable to find people near the vector line using a series of _pos nearObjects ["Man", _r]
and check collition with the vector ray using some algebra. The vector distance reading takes some time, so we could spawn a thread that test collitions in a succesion of circles like this:
I guess the easiest solution would be scraping _fnc_getTargetDistance
and ctrlText
ing the RSC element that calculates the distance.
@esteldunedain I use Newton iteration with lineIntersect commands, so I don't think that would work well.
Here is the script: https://github.com/KoffeinFlummi/AGM/blob/master/AGM_Core/functions/fn_getTargetDistance.sqf
distance
round parseNumber ctrlText ((uiNamespace getVariable ['AGM_dlgVectorOptics', displayNull]) displayCtrl 151)
azimuth
round parseNumber ctrlText ((uiNamespace getVariable ['AGM_dlgVectorOptics', displayNull]) displayCtrl 156)
inclination
round parseNumber ctrlText ((uiNamespace getVariable ['AGM_dlgVectorOptics', displayNull]) displayCtrl 182)
Yay for RSC magic.
Arma3: 1.24 Mods: CBA_A3 1.8 rc3, AGM_dev, TaskForceRadio AGM_dev from: 2014-08-11T08:10:54.702Z Tested on: self hosted MP mission Zeus enabled: Yes Modules: No modules
Can't get a distance with the Vector on an AI unit: (Holding "Distance Key" till the circle appears, then releasing "Distance Key")
Rangefinder for comparison:
It works on vehicles: