Exemplo n.º 1
0
        private void RefreshNode()
        {
            NavMesh procheNod = NavWesh.CheckProche(0.0f, 1.0f, Player.LocalPlayer.Location);

            foreach (Node n in procheNod.Nodes)
            {
                if (LastMesh != n.id)
                {
                    NavWesh.AddWay(LastMesh, n.id);
                    LastMesh = n.id;
                }
            }
            NavMesh liste = NavWesh.CheckProche(0.0f, 5.0f, Player.LocalPlayer.Location);

            if (liste.count == 0)
            {
                NavWesh.addNode(Player.LocalPlayer.Location, liste);
                NavWesh.AddWay(LastMesh, NavWesh.count - 1);
                LastMesh = NavWesh.count - 1;
            }
        }