diff options
Diffstat (limited to 'scene/3d/navigation.cpp')
| -rw-r--r-- | scene/3d/navigation.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index ce28350be0..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 @@ -455,7 +459,7 @@ Vector<Vector3> Navigation::get_simple_path(const Vector3& p_start, const Vector _clip_path(path,apex_poly,portal_right,right_poly); - apex_point=portal_right; + apex_point=portal_right; p=right_poly; left_poly=p; apex_poly=p; @@ -721,5 +725,3 @@ Navigation::Navigation() { last_id=1; up=Vector3(0,1,0); } - - |