AI Move To
The "AI Move To" action is used to move a Pawn/Character. The destination can be a location or another actor. The level must have a "Nav Mesh Bounds Volume" to define the area that the "AI Move To" action can use. It is a latent action, so it runs in parallel to the normal flow of execution of the Blueprints.
- Pawn: Reference to the Pawn/Character that will be moved.
- Destination: Vector indicating the destination.
- Target Actor: Reference to an actor to be used as destination.
- Acceptance Radius: Maximum destination distance to complete movement.
- Stop on Overlap: Boolean value. If true, complete the move as soon as the Pawn begins to overlap the "Acceptance Radius".
- On Success: Execution pin that will be activated when and if the "AI Move To" manages to reach the target.
- On Fail: Execution pin that will be activated if the destination can not be reached.
- Movement Result: Enumeration that indicates the result of the movement.
The image shows the "AI Move To" action being used for a Pawn to follow a path represented by a set of predefined points on the level. These points representing the path may be stored in an array. The "FindNextPoint" macro is responsible for picking the next point in the path and storing it in the "Next Point" variable.
|Click to enlarge|
The clock icon indicates that "AI Move To" is a latent action. The event "GoNextPoint" starts the "AI Move To" action, but only when the Pawn reach the destination is that the actions connected to the pin "On Success" will be performed. After the "FindNextPoint" macro updates the "Next Point" variable, the "GoNextPoint" event is called again.