Select scene geometry that should affect the navigation – walkable surfaces and obstacles.
Check Navigation Static on to include selected objects in the NavMesh baking process.
Adjust the bake settings to match your agent size.
Step Height defines how high obstructions are that the agent can step on.
Click bake to build the NavMesh.
Create a cylinder: GameObject > 3D Object > Cylinder.
The default cylinder dimensions (height 2 and radius 0.5) are good for a humanoid shaped agent, so we will leave them as they are.
Add a NavMesh Agent component: Component > Navigation > NavMesh Agent.
效果:
原文:https://www.cnblogs.com/Jaysonhome/p/13032471.html