diff --git a/components/detournavigator/recastmeshbuilder.cpp b/components/detournavigator/recastmeshbuilder.cpp index 6ee16cdc6c..19125e0a9b 100644 --- a/components/detournavigator/recastmeshbuilder.cpp +++ b/components/detournavigator/recastmeshbuilder.cpp @@ -36,7 +36,7 @@ namespace DetourNavigator TileBounds maxCellTileBounds(int size, const osg::Vec3f& shift) { - const float halfCellSize = size / 2; + const float halfCellSize = static_cast(size) / 2; return TileBounds { osg::Vec2f(shift.x() - halfCellSize, shift.y() - halfCellSize), osg::Vec2f(shift.x() + halfCellSize, shift.y() + halfCellSize)