Currently AI soldiers only get represented as actors on the client. This means if a player walks into an AI soldier even if the soldier is an actor on their client, because there's no actor on the server, the player will be able to walk right through the AI. Option 1 is probably better below.
Note: to view server LOD use console variable: pm.DebugMassPawnServerRepresentation 1
Option 1:
[x] In Project Settings search for "PawnServerRepresentationLOD" and update the LODDistance and LODMax Count values such that AI near player will be an actor (see screenshot below). We already configure PawnServerRepresentation trait in DA_MassSoldier_US/RU so that high LOD will have an actor.
[x] Update UMassPawnServerRepresentationLODProcessor::Execute so that if entity doesn't have FMassPlayerControlledPawnTag it won't automatically assign them medium LOD.
To verify fix:
[x] In L_SmallNoObstacles in client net mode walk into an AI soldier.
~Option 2:~
[ ] ~Update UMassPawnServerRepresentationLODProcessor::Execute so that for player controlled entities it will query UMassNavigationSubsystem's obstacle grid to find nearby entities. See UMassCharacterBlueprintLibrary::GetNearbyObstacles for an example. We should extract the common logic from that function into a shared function we can use both in GetNearbyObstacles and for this task.~
[ ] ~For nearby entities that are less than 4m (this is the value used in UMassCharacterBlueprintLibrary::GetNearbyObstacles which is fine), force them to high LOD so they'll be actors. See how we set RepresentationLODFragment.LOD in UMassPawnServerRepresentationLODProcessor::Execute as an example.~
Currently AI soldiers only get represented as actors on the client. This means if a player walks into an AI soldier even if the soldier is an actor on their client, because there's no actor on the server, the player will be able to walk right through the AI. Option 1 is probably better below.
Note: to view server LOD use console variable:
pm.DebugMassPawnServerRepresentation 1
Option 1:
To verify fix:
~Option 2:~
RepresentationLODFragment.LOD
in UMassPawnServerRepresentationLODProcessor::Execute as an example.~