From 1a397a78784023971124169dda9fc6d9c222a333 Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Tue, 26 Feb 2019 15:38:23 +0200 Subject: Consider StaticBody and NavMesh position when converting to a MeshLibrary Would have added mesh transform, but realized that will cause problems when moving the mesh around the scene for visualization purposes. Closes #11722 --- modules/gridmap/grid_map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gridmap/grid_map.cpp') diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index fe1eac6dc9..32a014e76d 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -517,7 +517,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) { Ref navmesh = mesh_library->get_item_navmesh(c.item); if (navmesh.is_valid()) { Octant::NavMesh nm; - nm.xform = xform; + nm.xform = xform * mesh_library->get_item_navmesh_transform(c.item); if (navigation) { nm.id = navigation->navmesh_add(navmesh, xform, this); -- cgit v1.2.3