This commit is contained in:
aozhiwei 2020-08-18 17:38:14 +08:00
parent fe61fb7d12
commit 2e61aa105a
2 changed files with 8 additions and 2 deletions

View File

@ -36,7 +36,9 @@ void NavMeshBuilder::Build(MapInstance* map_instance)
CreateTileCache(builder_params);
CreateNavMesh(builder_params);
BuildTiles(builder_params);
#if 0
BuildMapObstalce(builder_params);
#endif
map_instance->navmesh_ = builder_params.navmesh;
}

View File

@ -201,7 +201,7 @@ struct BuilderParams
const float kAgentMaxSlope = 90; //角色可走的最大坡度
const float kAgentHeight = 1; //角色高
const float kAgentMaxClimb = 1; //角色能爬的最大高度
const float kAgentRadius = 40; //角色半径
const float kAgentRadius = 20; //角色半径
const float kEdgeMaxLen = 6; //简化列表中相邻两点间的距离
const float kEdgeMaxError = 6; //从简化边到实边的最大距离
@ -217,7 +217,11 @@ struct BuilderParams
[,]
[,,]
*/
const float kRegionMergeSize = 6;
#if 1
const float kRegionMergeSize = 400;
#else
const float kRegionMergeSize = 20;
#endif
/*
: >= 3