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
This commit is contained in:
Bojidar Marinov 2019-02-26 15:38:23 +02:00
parent 22ee7ba4f0
commit 1a397a7878
No known key found for this signature in database
GPG key ID: 4D546A8F1E091856
4 changed files with 34 additions and 2 deletions

View file

@ -517,7 +517,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
Ref<NavigationMesh> 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);