Sampling Positions using Apex Utility AI and Apex Path

Introduction

This document is a part of a series of tutorial documents for getting started with the Apex Utility AI using Apex Path.

The purpose of this document is to provide a description to the classes used in the scene “AI_Demo_7”, as well as a tutorial on how to create a simple Apex Utility AI with the ability to scan for positions using Apex Path.

Sampling from the Apex Path Grid

Previously in AI Demo 4 the NavMesh was used for querying positions for walkability. The same can be achieved with Apex Path using very similar code. Thus, position sampling using the grid of Apex Path can be seen exemplified in the code snippet below.

Visualization

As we did previously for AI Demo 4, we can use an Apex Utility AI Gizmo Visualizer for visualizing the sampled positions. The visualization code is virtually unchanged except for the type of context and action. A sphere is drawn using Unity Editor Gizmos for each sampled position, as can be seen in the screenshot below.