AI Components - kgrav/Nite-Basik-Code-Samples GitHub Wiki
Classes
Root Class:
AI Vision, XRay, ZRay
AI Vision scans a constant field of vision every time a pre-defined period of time elapses. The center view is highly configurable, and uses a Z-Ray. A Z-Ray is a structure which casts a sphere relative to the forward direction of the vision component. This is very useful in checking for barriers and characters in an npc's field of view. The X-Ray casts a simple ray relative to a constant offset (relative to forward; i.e. an XRay initialized at a 30 degree offset would check a ray that is always 30 degrees of rotation from the relative forward axis). This rounds out the field of vision, and cheaply checks for objects that lay just outside of the sphere cast, but could still be considered part of the "cone of vision." AIVision retains a constant array of Raycast Hit data that may be queried at any time, and there are static methods in place for checking if a Raycast Hit is valid.
AILegs
Infrared
A structure which enables the attached AI Character to be picked up by the player's targeting system. Occasionally updates to see if there are any other targets in range, just in case we're still targeting when we defeat the current target.