Question by
qaz34 · May 28, 2019 at 07:49 AM ·
navmeshvoxelruntime-generation
Runtime Navmesh only getting edges of mesh
When Generating the navmesh at run time the navmesh has a massive gap in the middle of what was generated.
sources.Clear();
foreach (Chunk chunk in chunks)
{
chunk.BuildChunk();
var s = new NavMeshBuildSource();
s.shape = NavMeshBuildSourceShape.Mesh;
s.sourceObject = chunk.mesh;
s.transform = chunk.meshObject.transform.localToWorldMatrix;
s.area = 0;
sources.Add(s);
}
var data = NavMeshBuilder.BuildNavMeshData(NavMesh.GetSettingsByID(0), sources, new Bounds(Vector3.zero, new Vector3(100,100,100)), Vector3.zero, Quaternion.identity);
NavMesh.AddNavMeshData(data);
issue-2.jpg
(84.5 kB)
issue.jpg
(87.7 kB)
Comment
Your answer
Follow this Question
Related Questions
Creating NavMeshAgent types at runtime 0 Answers
Function Update is not being called when object have a parent 0 Answers
Voxel Planet 1 Answer