NavMeshComponents | High Level API Components for Runtime NavMesh Building | Game Engine library
kandi X-RAY | NavMeshComponents Summary
kandi X-RAY | NavMeshComponents Summary
Please use the branch matching the version of your Unity editor: master for the latest released LTS version and up to 2020.2, 2019.3 for up to 2019.4-LTS, 2018.3 for up to 2018.4-LTS and 2019.2, 2018.2, 2018.1, 2017.2 for up to 2017.4-LTS, 2017.1, 5.6. You can use the package branch in Unity 2019.4 or newer in order to add this code to a project in the form of a package. For instructions please refer to the Setup section of the README file.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of NavMeshComponents
NavMeshComponents Key Features
NavMeshComponents Examples and Code Snippets
Community Discussions
Trending Discussions on NavMeshComponents
QUESTION
Problem:
I'm having problems baking a C# generated mesh using the NavMeshSurface script provided in NavMeshComponents.
If I bake the NavMeshSurface on the "WalkableMesh" GameObject the baking is over quickly and nothing is walkable. The NavMeshSurface does not turn blue to indicate it is navigable.
Setup/Installation:
Here is a complete zip of the assets if you would like to see the behavior I describe below. Copy these into your project root (I'm using Unity 2019.3) and you'll be half way there.
Below are the settings for my agent. You will have to set your agent to these settings in the Navigation window.
To modify these settings, in the toolbar select Window->AI->Navigation
These are the settings you'll have to set on the PLANE NavMeshSurface. This allows the NavMesh geometry to be detailed enough to bake single tiles at the 32x16px size.
Further Information:
I'm creating the meshes I'm trying to bake by iterating over a TileMap. This allows me to have separate areas with completely separate meshes for the differing pathing costs. As I said above baking does not work on these meshes directly.
I can bake the NavMesh INDIRECTLY by taking a separate plane and baking that plane ANYWHERE in the scene. Baking will bake both the plane and the NavMeshSurface on the "WalkableSurface" GameObject. The area assigned to the generated NavMesh is determined by the plane GameObject's NavMeshSurface area settings.
1) Why does the WalkableMesh object not bake without this plane?
2) Why does the plane bake the WalkableMesh?
You can see the square plane baking the WalkableSurface below.
The NavMeshSurface I'm adding in code also reports the Namespace could not be found but it is added nonetheless.
Error CS0246 The type or namespace name 'NavMeshSurface' could not be found (are you missing a using directive or an assembly reference?)
ANSWER
Answered 2020-May-08 at 07:42Basically all my problems went away when I decided to move my NavMesh to the XZ plane.
This library SHOULD WORK with the XY plane but it clearly doesn't work properly. It seems like it's ALMOST there but it just isn't.
The process for baking the meshes is now to simply make the meshes in turn, setting the area type, and then baking from the Navigation window.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install NavMeshComponents
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page