EntityNavAgent
Makes an entity walk on a navmesh.
EntityNavAgent ( entity,navmesh[,speed#][,turn] )
Parameters
- entity
- the entity, such as a character model.
- navmesh
- the navmesh it walks on, built with BuildNavMesh; 0 to stop it being an agent.
- speed# (optional)
- how fast it walks, in units per second. Defaults to 4.
- turn (optional)
- 1 to turn it to face the way it walks, smoothly and staying upright; 0 to leave its turning to you.
Description
Makes an entity a navigation agent: something that walks on a navmesh by itself. Send it somewhere with NavigateTo, and each UpdateWorld walks it along the way, round walls, up ramps and stairs, keeping it the same height above the ground as it was. Agents on the same navmesh keep out of each other's way. Agents move before collisions are worked out, so Collisions still apply to them.
