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

Fixes some instances of groups shooting into air #383

Merged

Conversation

nk3nny
Copy link
Owner

@nk3nny nk3nny commented Feb 26, 2024

Fixes Suppress, Flank and Assault group level actions -- where sometimes Units would shoot into air
Fixes units shooting UGL sometimes not partaking in assault.

Fixes Suppress, Flank and Assault group level actions -- where sometimes Units would shoot into air
Fixes units shooting UGL sometimes not partaking in assault.
@nk3nny nk3nny self-assigned this Feb 26, 2024
@rekterakathom
Copy link
Contributor

In other functions, instead of 'fixing' the height to 0.5, they just exit. Would that be a smarter thing to do here too? If a target is over 6 meters from the ground, what does it help to assume the height to be 0.5 instead and miss the target by at least 5.5 meters?

@jokoho48
Copy link
Collaborator

In other functions, instead of 'fixing' the height to 0.5, they just exit. Would that be a smarter thing to do here too? If a target is over 6 meters from the ground, what does it help to assume the height to be 0.5 instead and miss the target by at least 5.5 meters?

no, that would filter out the functions early as _target can be an "expected" position of a target as those are often Extrapolated based on last seen velocity

@rekterakathom
Copy link
Contributor

In other functions, instead of 'fixing' the height to 0.5, they just exit. Would that be a smarter thing to do here too? If a target is over 6 meters from the ground, what does it help to assume the height to be 0.5 instead and miss the target by at least 5.5 meters?

no, that would filter out the functions early as _target can be an "expected" position of a target as those are often Extrapolated based on last seen velocity

I can see how that's useful, but can we be certain that it is always just extrapolation errors? What if a target really is 6 meters (or more) above ground? In my humble opinion, it's better to sometimes not act even if a target is valid (extrapolation error) than to always act at the risk of unintended behaviour (shooting at least 5.5 meters below an actual target).

For example, could these checks run for air vehicles, paratroopers or infantry rappelling from a helicopter? If yes, then this would result in basically malfunctioning AI.

And like I said, in other functions, this exact same condition is used to exit, rather than to just correct the position.

@rautamiekka
Copy link
Contributor

it's better to sometimes not act even if a target is valid (extrapolation error) than to always act at the risk of unintended behaviour (shooting at least 5.5 meters below an actual target).

Inclined to agree that in terms of realism (and thus less immersion-breaking) it's better to ignore in this case than shoot God knows where; frozen from fear, a broken down gun, an impaired vision ... Any of just those would be a better flimsy excuse than shoot meters off the mark and claim a huge "Can't shoot straight" problem.

^ Still, if someone wanna play 'Arma', they can quickly disregard such immersion breakage if the mission still functions as intended, so I'm fine with either.

@nk3nny
Copy link
Owner Author

nk3nny commented Feb 26, 2024

Nice catch with TacticsContact. I'll update that too! As @jokoho48 notes the position passed to these functions are usually derived from getHideFrom. This is the position the AI thinks the enemy is occupying, but it unfortunately sometimes reads far above ground.

The benefit is that it gives, what I call in the design philosophy, the AI a degree of fuzzy predictability. The AI seems to be affected by the fog of war. The AI is operating not on perfect knowledge. And so on. You don't have to participate in many platoon level engagements with players, particularly PvP, to experience a lot of fire expended uselessly. ;)

that said: I wouldn't be opposed with a function to replace our use of getHideFrom with one that allows the option of giving the AI perfect getPosATL knoweldge(!).

@nk3nny nk3nny merged commit bf6e891 into master May 5, 2024
4 checks passed
@jokoho48 jokoho48 deleted the Fix-assaulting-suppressing-and-flanking-targets-in-the-air branch May 5, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants