docs.unity3d.com
    Show / Hide Table of Contents

    About NavMesh agents

    The NavMesh agent is a GameObject that is represented by an upright cylinder whose size is specified by the Radius and Height properties. The cylinder moves with the GameObject, but remains upright even if the GameObject rotates. The shape of the cylinder is used to detect and respond to collisions with other agents and obstacles. When the anchor point of the GameObject is not at the base of the cylinder, use the Base Offset property to specify the height difference.

    How the anchor point and base offset work together

    The height and radius of the cylinder are specified in the Navigation window and the NavMesh Agent component properties of the individual agents.

    • Navigation window settings describe how all the NavMesh Agents collide and avoid static world geometry. To keep memory on budget and CPU load at a reasonable level, you can only specify one size in the bake settings.
    • NavMesh Agent component properties values describe how the agent collides with moving obstacles and other agents.

    Typically you set the size of the agent with the same values in both places. However, you might, give a heavy soldier a larger radius, so that other agents leave more space around your soldier. Otherwise, your soldier avoids the environment in the same manner as the other agents.

    Additional resources

    • Create a NavMesh Agent
    • NavMesh Agent component reference
    • NavMesh Agent scripting reference
    Back to top
    Copyright © 2023 Unity Technologies
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on Thursday, October 19, 2023