Pawn detection
To give our pawn the most up-to-date information, we need to create an event that will catch and respond to the sensory update events from the AI Perception component. We will establish this by creating a new event that is solely responsible for processing detected pawns. Here are the steps:
- Let's right-click anywhere and go under Add Event. From there, we want to add a custom event, and we will name the new event
Detected Enemies
. We have to also create a new actor array parameter namedDetected Actors
to hold the array of Updated Actors. - Now, in the next step, we need to recompile a blueprint to call the AIController and the Detected Enemies function from our OnPerceptionUpdated event:
- In the next steps, we will handle the transitions ...
Get Unreal Engine 4 AI Programming Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.