Description

A licensee has reported that Pawns that are loaded via a runtime Data Layer are unable to be perceived automatically by Pawns that are not part of a runtime data layer. However, data layer Pawns can automatically perceive Pawns that are loaded with the level (that is to say Pawns that are not part of a runtime data layer). It appears that the AISense flag bAutoRegisterAllPawns is not working correctly in the Perception System as Pawns load from runtime data layers.

There is a workaround by adding an AIPerceptionStimuliSourceComponent to the Pawns and configuring it to register as a source for the relevant senses. The downside is that this requires each Pawn to host another component. This also does not address the underlying issue of data layer loaded Pawns not being auto-registered for AI Sense's that have the bAutoRegisterAllPawns flag enabled.

Steps to Reproduce
  1. Create new map using World Partition.
  2. Create a new AI controller
  3. Add an AI Perception component to the AI controller
  4. Add a Sight config to the Perception component and set its Peripheral Vision Half Angle to 180
  5. Add two pawns to the level that are 
  6. Assign the new AI controller to auto-possess each pawn
  7. Create a new Data Layer
  8. Set the data layer to a runtime layer than begins Unloaded
  9. Add one pawn to the data layer
  10. Create a new Actor BP to load the data layer
  11. Add a delay and call SetDataLayerRuntimeState node to the Begin Play event
  12. PIE and open the Gameplay Debugger and enable the Perception category

Expected Result: **Both pawns can "see" each other as evidenced by the GameplayDebugger

Actual Result: The non-data layer pawn cannot "see" the data layer pawn, but the data layer pawn can "see" the non-data layer pawn.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-161546 in the post.

0
Login to Vote

Fixed
ComponentUE - AI - Perception
Affects Versions5.0
Target Fix5.2
Fix Commit21818056
Main Commit21818056
CreatedAug 22, 2022
ResolvedSep 8, 2022
UpdatedJan 17, 2023