Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Tutorial - Upgrade Your AI With Door-Opening Capabilities | AI Series Part 36

Discussion in 'Community Learning & Teaching' started by ChrisKurhan, Jan 11, 2022.

  1. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    266


    Hey all! Happy #TutorialTuesday!

    Learn how to set up your NavMesh with Doors to allow your NavMeshAgents to correctly path through them and open them automatically! In this tutorial I cover the scene setup, the door opening behavior ensuring the door opens away from the Agent, and ensuring the Agent does not walk through the door model while it's open! Using this technique you can easily add doors into your scene that can be automatically opened by NavMeshAgents.
    Of course, you can also build on top of this logic to add conditions when the door should be locked and not open, or require any other condition to be true before the door can be opened.

    As always, the full project is available on GitHub!

    If you're getting value from this series, please consider liking, subscribing, and sharing to help these tutorials reach and add value to even more people. New tutorials are posted every Tuesday!