Version: 5.3 (switch to 5.4b)
IdiomaEnglish
  • C#
  • JS

Idioma de script

Selecciona tu lenguaje de programación favorito. Todos los fragmentos de código serán mostrados en este lenguaje.

NavMesh

class in UnityEngine

Sugiere un cambio

¡Éxito!

Gracias por ayudarnos a mejorar la calidad de la documentación de Unity. A pesar de que no podemos aceptar todas las sugerencias, leemos cada cambio propuesto por nuestros usuarios y actualizaremos los que sean aplicables.

Cerrar

No se puedo enviar

Por alguna razón su cambio sugerido no pudo ser enviado. Por favor <a>intente nuevamente</a> en unos minutos. Gracias por tomarse un tiempo para ayudarnos a mejorar la calidad de la documentación de Unity.

Cerrar

Cancelar

Cambiar al Manual

Descripción

Singleton class to access the baked NavMesh.

The NavMesh is a class can be used to do spatial queries, like pathfinding and walkability tests, set the pathfinding cost for specific area types, and to tweak global behavior of pathfinding and avoidance.

In order to use the spatial queries, you need to first bake NavMesh for your Scene.

See also:
Building a NavMesh – for more information on how to setup and bake NavMesh
Areas and Costs – to learn how to use different Area types.
NavMeshAgent – to learn how to control and move NavMesh Agents.
NavMeshObstacle – to learn how to control NavMesh Obstacles using scripting.
OffMeshLink – to learn how to control Off-Mesh Links using scripting.

Variables Estáticas

AllAreasArea mask constant that includes all NavMesh areas.
avoidancePredictionTimeDescribes how far in the future the agents predict collisions for avoidance.
pathfindingIterationsPerFrameThe maximum amount of nodes processed each frame in the asynchronous pathfinding process.

Funciones Estáticas

CalculatePathCalcular la ruta entre dos puntos y almacenar el resultado.
CalculateTriangulationCalculates triangulation of the current navmesh.
FindClosestEdgeLocate the closest NavMesh edge from a point on the NavMesh.
GetAreaCostGets the cost for path finding over geometry of the area type.
GetAreaFromNameReturns the area index for a named NavMesh area type.
RaycastTrace a line between two points on the NavMesh.
SamplePositionFinds the closest point on NavMesh within specified range.
SetAreaCostSets the cost for finding path over geometry of the area type on all agents.