diff options
Diffstat (limited to 'scene/3d/navigation.cpp')
-rw-r--r-- | scene/3d/navigation.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index 186f0d8e00..2b74d43ad2 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -64,7 +64,11 @@ void Navigation::_navmesh_link(int p_id) { continue; } - p.center=center/plen; + p.center = center; + if( plen != 0 ) { + p.center /= plen; + } + //connect @@ -721,5 +725,3 @@ Navigation::Navigation() { last_id=1; up=Vector3(0,1,0); } - - |