Closed Leroy231 closed 4 months ago
We have a PR which fixes this issue, but it introduces other regressions: https://github.com/HaywireInteractive/OnAllFronts/pull/19. Next step should be to check why we can't reproduce this issue in City Sample by narrowing down the differences.
For a more recent commit with the PR above (with some different logging) see https://github.com/HaywireInteractive/OnAllFronts/commit/a488b568db61720cb6ef7b2538819446de781f20
Fixed with recent Mass Crowd Detour movement.
May want to wait on https://github.com/HaywireInteractive/OnAllFronts-Public/issues/920 before working on this. After it's done we should verify if this bug still exists and do the subtask below.
Watch this video for the bug (happens at 35 seconds): https://youtu.be/jveI9Xr8S5w?t=31
Steps to reproduce (use the shorter steps below when debugging):
Steps to reproduce (short):
ai.debug.mass.DebugEntity 3
andpm.UseDrawDebugHelpers 1
. The red arrow is the avoidance force.https://github.com/HaywireInteractive/OnAllFronts-Public/assets/108254625/76693023-490d-4466-8621-20b4cda13db0
If you move slightly off the path of the other soldier then avoidance works fine:
https://github.com/HaywireInteractive/OnAllFronts-Public/assets/108254625/a70ddbf6-d29e-456c-98e0-5b968cc4d659
If the still entity is not player controlled they use standing avoidance which helps a little (from L_Small_AvoidanceTestNoPlayer):
https://github.com/HaywireInteractive/OnAllFronts-Public/assets/108254625/ab73df73-4283-4258-99fa-ac4005cadb13
Instead of getting stuck momentarily, soldiers should move around any others nearby. Here's an example of what that same avoidance code produces in City Sample:
https://user-images.githubusercontent.com/108254625/224178067-b298a163-f99a-4eb2-ab35-b86e1cff9731.mp4
The logic for avoidance comes from UE source code here: https://github.com/EpicGames/UnrealEngine/blob/d9d435c9c280b99a6c679b517adedd3f4b02cfd7/Engine/Plugins/AI/MassAI/Source/MassNavigation/Private/MassAvoidanceProcessors.cpp#L719. It has already been copied into our codebase since we made some minor changes to it previously. But the bug exists in both versions of the code.
Things we've already tried but didn't help with fixing the issue:
Other things to try: