PawnSensingComponent vs. AIPerceptionComponent

Hey Jodon,

PawnSensingComponent is indeed a legacy AI perception solution that we’re no longer developing, but we left it hanging around due to its simplicity and the fact that some people use it in their projects that don’t really need a proper AI perception solution offered via AIPerceptionComponent.

The “new” perception system has indeed been build for both flexibility and performance (as much as those two can be combined) and the best example of it is the Sight sense implementation and how it handles a big set of queries with a limited number of line-of-sight traces allowed per frame.

I’d say that’s the biggest difference between new AI perception and Pawn Sensing - the latter makes every AI do it’s sensing independently of one another, and that can end up being very costly, while the new Perception is in the business of batching stuff.

The way you use new perception, in short, is by adding AIPerceptionComponent to your AIControllers, and fill out its SensesConfig. Let me know if you run into issues with that.

Cheers,

–mieszko

1 Like