From daff7aba012dd91f8db1496eb304bbbeabf61002 Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 9 Oct 2021 17:44:25 +0200 Subject: [PATCH] Use different colors for walkable and non-walkable triangles --- components/sceneutil/recastmesh.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/sceneutil/recastmesh.cpp b/components/sceneutil/recastmesh.cpp index 97efe010df..18cec022ff 100644 --- a/components/sceneutil/recastmesh.cpp +++ b/components/sceneutil/recastmesh.cpp @@ -64,8 +64,8 @@ namespace SceneUtil const auto normals = calculateNormals(vertices, indices); const auto texScale = 1.0f / (settings.mCellSize * 10.0f); - duDebugDrawTriMesh(&debugDraw, vertices.data(), static_cast(vertices.size() / 3), - indices.data(), normals.data(), static_cast(indices.size() / 3), nullptr, texScale); + duDebugDrawTriMeshSlope(&debugDraw, vertices.data(), static_cast(vertices.size() / 3), + indices.data(), normals.data(), static_cast(indices.size() / 3), settings.mMaxSlope, texScale); osg::ref_ptr material = new osg::Material; material->setColorMode(osg::Material::AMBIENT_AND_DIFFUSE);