diff --git a/Engine/source/navigation/navMesh.cpp b/Engine/source/navigation/navMesh.cpp index dc4b9c6cc..2c3d1b8c1 100644 --- a/Engine/source/navigation/navMesh.cpp +++ b/Engine/source/navigation/navMesh.cpp @@ -195,9 +195,9 @@ NavMesh::NavMesh() mCellSize = mCellHeight = 0.2f; mWalkableHeight = 2.0f; - mWalkableClimb = 0.3f; + mWalkableClimb = 0.5f; mWalkableRadius = 0.5f; - mWalkableSlope = 40.0f; + mWalkableSlope = 45.0f; mBorderSize = 1; mDetailSampleDist = 6.0f; mDetailSampleMaxError = 1.0f; diff --git a/Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.gui b/Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.gui index 412eacaa3..51e50897a 100644 --- a/Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.gui +++ b/Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.gui @@ -352,6 +352,7 @@ function CreateNewNavMeshDlg::create(%this) %mesh = 0; + %navFileLoc = filePath($Client::MissionFile) @ "/" @ fileBase($Client::MissionFile) @".nav"; if(MeshMissionBounds.isStateOn()) { if(!isObject(getScene(0))) @@ -362,14 +363,15 @@ function CreateNewNavMeshDlg::create(%this) // Get maximum extents of all objects. %box = MissionBoundsExtents(getScene(0)); %pos = GetBoxCenter(%box); - %scale = (GetWord(%box, 3) - GetWord(%box, 0)) / 2 + 5 - SPC (GetWord(%box, 4) - GetWord(%box, 1)) / 2 + 5 - SPC (GetWord(%box, 5) - GetWord(%box, 2)) / 2 + 5; - + %scale = (GetWord(%box, 3) - GetWord(%box, 0)) + 1 + SPC (GetWord(%box, 4) - GetWord(%box, 1)) + 1 + SPC (GetWord(%box, 5) - GetWord(%box, 2)) + 1; + %mesh = new NavMesh(%name) { position = %pos; scale = %scale; + fileName = %navFileLoc; }; } else @@ -378,6 +380,7 @@ function CreateNewNavMeshDlg::create(%this) { position = %this-->MeshPosition.getText(); scale = %this-->MeshScale.getText(); + fileName = %navFileLoc; }; } getScene(0).add(%mesh);