GenerateNavMeshPanel WIP

This commit is contained in:
dexyfex
2018-06-02 02:25:12 +10:00
Unverified
parent 4c131fa0af
commit 0b6432ceff
11 changed files with 2395 additions and 513 deletions
@@ -386,6 +386,10 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders
ynv.Nav.SectorTree.AABBMax = new Vector4(NavGrid.GetCellMax(cell), 0.0f);
ynv.AreaID = cell.X + cell.Y * 100;
ynv.Polys = new List<YnvPoly>();
ynv.HasChanged = true;//mark it for the project window
ynv.RpfFileEntry = new RpfResourceFileEntry();
ynv.RpfFileEntry.Name = ynv.Name + ".ynv";
ynv.RpfFileEntry.Path = string.Empty;
cell.Ynv = ynv;
YnvFiles.Add(ynv);
}
@@ -253,7 +253,7 @@ namespace CodeWalker.GameFiles
{
ind = (ushort)vertlist.Count;
vertdict[v] = ind;
vertlist.Add(NavMeshVertex.Create((v - posoffset) * aabbsizeinv));
vertlist.Add(NavMeshVertex.Create(Vector3.Clamp((v - posoffset) * aabbsizeinv, Vector3.Zero, Vector3.One)));
}
if ((poly.Indices != null) && (n < poly.Indices.Length))
{