Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missileguidance - Use checkVisibility to test LOS for missile seekers #7014

Merged
merged 1 commit into from
Jun 5, 2019

Conversation

BaerMitUmlaut
Copy link
Member

When merged this pull request will:

  • Make missiles using optical guidance (for example the Javelin) now lose lock once the target gets behind smoke

0.001 as a visibility limit seemed reasonable with my testing with a smoke grenade, I'd rather go higher (missiles would then easier lose lock) than lower. If a tank pops a smoke wall, it should be well within that limit anyways.

Not tested with actually firing a missile yet, since the tank would have to pop smoke at just the right time and also be moving, because the missile will still fly straight if it loses lock.

Closes #7012, also ref. #6744 which still needs additonal code when actually locking on to fix completely.

@BaerMitUmlaut BaerMitUmlaut added the kind/enhancement Release Notes: **IMPROVED:** label May 22, 2019
@Drofseh
Copy link
Contributor

Drofseh commented May 22, 2019

Most thermal sensors see through smoke, unless that smoke is specifically designed to be opaque to thermal EM.

@severgun
Copy link
Contributor

unless that smoke is specifically designed to be opaque to thermal EM.

And all of vehicle smokes are such kind of. Isn't it?

@Drofseh
Copy link
Contributor

Drofseh commented May 22, 2019

Only the more modern ones, since around the mid-80's.

@BaerMitUmlaut
Copy link
Member Author

In Arma all smoke is thermally opaque afaik. I don't know any optically guided fire and forget ATGMs that were developed before the 80s either.

@Drofseh
Copy link
Contributor

Drofseh commented May 22, 2019

Right, but you could be firing a modern weapon at an older tank.
Say a Javelin at a T-55.

@jonpas
Copy link
Member

jonpas commented May 22, 2019

Could add a config entry to at least give the option to change it per tank/missile.

@TheCandianVendingMachine
Copy link
Contributor

I don't think that's feasible. Some missiles don't lock on to targets but would still be affected by thermal smoke

@BaerMitUmlaut
Copy link
Member Author

@jonpas no, you couldn't. How would you know that the smoke that's blocking LOS was caused by that vehicle?

Again, since all smoke is thermally opaque in Arma and you'd have the same problem in vanilla, I'd rather go for this option. The T-55 might have been equipped with newer smoke ammo after all.

@jonpas
Copy link
Member

jonpas commented May 22, 2019

Yes, I tend to agree. This is the best we can do at the moment.

@jonpas jonpas added this to the 3.12.7 milestone May 22, 2019
@PabstMirror
Copy link
Contributor

PabstMirror commented May 22, 2019

We could check normal lis and checkVisibility, if checkVis is blocked then check for presence of vehicle based smoke (SmokeShellVehicle)

I guess to be perfect you would have to check for smoke at multiple points on a line from missile to target, but missile should be up high and I think just checking at target is fine.

Vanilla/CUP/RHS both seem to be using SmokeLauncherMag, which is a scripted ammo that launches SmokeShellVehicle

params ["_seeker", "_target"];

if (!((lineIntersectsSurfaces [getPosASL _seeker, aimPos _target, _seeker, _target]) isEqualTo [])) exitWith { false };

private _visibility = [_seeker, "VIEW", _target] checkVisibility [getPosASL _seeker, aimPos _target];
if (_visibility > 0.001) exitWith { true };

// Check if visibility is blocked due to vehicle based smoke launcher
// Note: bis_fnc_effectfiredsmokelauncher spawns SmokeShellVehicle, but particle effects are scripted?
private _shells = _target nearObjects ["SmokeShellVehicle", 30];
_shells isEqualTo [] // return

edit: we should also ace_cough when players walk through vehicle smoke 😉

@BaerMitUmlaut
Copy link
Member Author

BaerMitUmlaut commented May 22, 2019

lis is not necessary, checkVisibility takes care of that and will do multiple ray casts.
What if visibility is low because a bush, but there is no vehicle smoke involved? This would also require special magazines for non-thermal blocking smoke. Really not a fan of making this more complex than necessary.

@Gwynblade
Copy link

Speaking of thermally opaque smoke, is it possible to make the smoke not be thermally opaque?
Having a variant of smoke grenades that don't block thermals would add an interesting gameplay mechanic (for infantry smokes I mean).

I wanted to post this in feature requests ages ago, but figured something like this is probably not possible.

@PabstMirror PabstMirror changed the title Use checkVisibility to test LOS for missile seekers Missileguidance - Use checkVisibility to test LOS for missile seekers Jun 5, 2019
@PabstMirror PabstMirror merged commit 9c55c36 into master Jun 5, 2019
@PabstMirror PabstMirror deleted the missileguidance-countermeasures branch June 5, 2019 01:20
@PabstMirror PabstMirror modified the milestones: 3.12.7, 3.13.0 Jul 5, 2019
@PabstMirror PabstMirror modified the milestones: 3.13.0, 3.13.0-temp2 Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AT-Counter Measures not effective (in vanilla game it looks more effective)
7 participants