ikpil / DotRecast

DotRecast - a port of Recast & Detour, Industry-standard navigation mesh toolset for .NET, C#, Unity3D, games, servers
zlib License
563 stars 72 forks source link

How to convert obj files into voxels files? #71

Open Canghaizhulei opened 5 months ago

Canghaizhulei commented 5 months ago

I want to use Dynamic NavMesh, but I don't know how to generate voxels files.

ikpil commented 5 months ago

I've checked, and I've found an issue. I'll mention you once the fix is done.

ikpil commented 1 month ago

@Canghaizhulei After you receive the latest update, take a look at line 144 in RcDynamicUpdateTool.cs. You will find the Copy(...) function there. By looking at this function, you should be able to figure it out.

        public DtDynamicNavMesh Copy(RcConfig cfg, IList<RcBuilderResult> results)
        {
            var voxelFile = DtVoxelFile.From(cfg, results);
            dynaMesh = new DtDynamicNavMesh(voxelFile);
            dynaMesh.config.keepIntermediateResults = true;
            colliderGizmos.Clear();

            return dynaMesh;
        }

image image