KoffeinFlummi / AGM

Authentic Gameplay Modification for A3 | THIS PROJECT IS NO LONGER BEING WORKED ON. ALL ISSUES AND PULL REQUESTS WILL BE IGNORED.
Other
125 stars 84 forks source link

Vector can't get distance on class "Men" #829

Closed bux closed 10 years ago

bux commented 10 years ago

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") arma3 2014-08-11 15-37-56-180

Rangefinder for comparison: arma3 2014-08-11 15-29-11-103

It works on vehicles: arma3 2014-08-11 15-40-06-938

commy2 commented 10 years ago

Engine limitation.

CorruptedHeart commented 10 years ago

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?

nicolasbadano commented 10 years ago

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:

untitled-1

commy2 commented 10 years ago

I guess the easiest solution would be scraping _fnc_getTargetDistance and ctrlTexting 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

commy2 commented 10 years ago

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)

commy2 commented 10 years ago

Yay for RSC magic.

KoffeinFlummi commented 10 years ago