Unity3d game Development (Navmesh) and pathfinding (pathfinding) baking

Source: Internet
Author: User

Welcome to Unity Learning, unity training, Unity Enterprise training and education zone, there are many u3d resources, u3d training videos, u3d tutorials, U3d Frequently asked questions, U3d Project source code, we are committed to creating the industry Unity3d training, learning the first brand.Navigation mesh Baking
Once you've tagged the navigation grid (Navmesh) Geometry and layers, you can bake navigation mesh geometry.

in the Navigation (Navigation) window (window), navigate (Navigation), Go to the Bake (Bake) tab (upper-right corner) and click the Bake button (lower-right corner).



Navigating the baking window

Here are the properties that will affect the navigation grid (Navmesh) Baking:


Radius (RADIUS) The radius of the "typical" proxy (preferably the minimum value).
Altitude (height) The height of the "typical" agent (the role passes the desired "gap").
Max Slope (Max Slope) All surfaces with a slope greater than this value are discarded.
Step Height (Step) When the height difference is lower than the step height, it is considered to be connected to the navigation grid area.
Drop Heights (drop height) If the property value is positive, the split grid link is placed for the adjacent navigation mesh surface with a height difference less than that value.
Jumping distance (jump distance) If the property value is positive, a detached grid link is placed for the surface of the adjacent navigation grid that has a horizontal distance less than the value.
Senior (Advanced)
Minimum area (min regions area) Areas smaller than this threshold will be discarded.
Width error (inaccuracy)% Allowable width error
Height error (height inaccuracy)% Allowable height Error
Height Mesh If this option is checked, the original height information is stored. This can have a certain effect on speed and memory performance.

Note that the baked navigation grid is part of the scene and the delegate can navigate through the grid. To delete the navigation grid, click Clear in the Bake (Bake) tab.

Implementation Details
when you bake a navigation grid (Navmesh), it maps to squares in the XZ plane. When you visualize a square, its border is treated as a bright blue axis snapline on the navigation grid (Navmesh). Unity supports up to 1024 squares in a scene, each of which is represented by a 1000x100 individual. If you plan to have the agent navigate large areas, notice the size of the navigation grid (Navmesh) and the final number of meshes.



navigation grid with bright blue axis snaplines displays grid scale

The default setting for radius (RADIUS) is 0.5, and the default setting for width error (inaccuracy) is 0.16666667 (16.666667%). The default setting of the square edge length can be calculated as:
1000 * (Depth of RADIUS) * Width error = 1000 * (2*0.5) * 0.16666667 = 166.66667.

increasing the width inaccuracy will allow larger areas to be accommodated, but will reduce the accuracy of the navigation grid (Navmesh).

For example, if your grid has a total of 32 squares, you will have 1024 squares. This means that if you have a really huge terrain that you want to use with the navigation grid (Navmesh), the terrain area must not exceed 5.333 times 5.333 km (32 * 166.66667 meters) by default.
please click "Dog planing Learning net" for more highlights .http://www.gopedu.com/

Unity3d game Development (Navmesh) and pathfinding (pathfinding) baking

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.