14

Entering Mixed Reality with the XR Interaction Toolkit

In Chapter 13, we made some changes to our 3D FPS game’s enemy NPCs. We upgraded them from 2D to 3D components while still using waypoints for navigation but utilized Unity’s NavMesh system to rapidly implement the patrolling behavior. We also enhanced the complexity of the NPC behavior by adding sensors that allow them to interact with the player and the environment in a more realistic way.

We continued by discussing how to create dynamic enemy behavior using our sensors as conditions within behavior trees. We then completed our AI discussion with an introduction to machine learning (ML) using Unity’s ML-Agents, which enables NPCs to learn and evolve. We can create remarkable experiences ...

Get Unity 2022 by Example 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.