Skip to main content
Version: 3.0

class NavMeshAgent

(Niantic.Lightship.AR.NavigationMesh.NavMeshAgent)

NavMeshAgent is an example agent implementation that navigates a NavMesh based on logic programmed here. You place this MonoBehaviour on a GameObject to have that GameObject navigate autonomously through your real environment. You can create new versions of this to change how your creatures navigate the NavMesh. For example you may want to use physics/forces or add splines rather than straight lines. This is a basic example that using linear interpolation and coroutines.

    class NavMeshAgent: MonoBehaviour {
public:

enumAgentNavigationState;

// properties

AgentNavigationState State;
Path path;

// methods

void StopMoving();
void SetDestination(Vector3 destination);
};