Scene to be GridMap
1. Create a scene to be GridMap
2. Add a MeshInstance node, then New PlaneMesh because this will prevent Godot from calculating the wrong path. From the issue here
3. Click the MeshInstance node, create Create Trimesh Static Body and Create Navigation Mesh, then save the .tscn.
Scene to display the path
1. Add a Navigation node
2. Add a NavigationMeshInstance node as a child of the Navigation node
3. Add a NavigationMeshInstance node, create a New NavigationMesh
4. Add a GridMap node as a child of the Navigation node
5. In the GridMap node, create a New MeshLibrary, then Edit
6. In the middle of the screen, press Mesh Library, then select Import from scene(ignore Transformations)
7. Go back to the NavigationMeshInstance node and press Bake Navmesh.
No comments:
Post a Comment