WanderState.ReturnToOrigin C# (CSharp) Method

ReturnToOrigin() private method

private ReturnToOrigin ( ) : void
return void
    private void ReturnToOrigin( )
    {
        // Sample the provided Mesh Area and get the nearest point
        NavMesh.SamplePosition( new Vector3(0, 0, 0), out hit, Random.Range( 0f, critter.maxWalkDistance), MeshArea  );

        critter.navMeshAgent.SetDestination( hit.position );
    }