From a30dd094d345fc7bf65bc10486b2797e19054d56 Mon Sep 17 00:00:00 2001 From: Pawel Lampe Date: Sun, 30 Jan 2022 11:30:17 +0100 Subject: Fix transforms involved into navmesh baking Within the context of parsing navigation geometry, this commit: - added missing transform of `MultiMeshInstance` - changed all transforms to global ones so that they don't need to be calculated by hand --- modules/navigation/navigation_mesh_generator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/navigation/navigation_mesh_generator.h') diff --git a/modules/navigation/navigation_mesh_generator.h b/modules/navigation/navigation_mesh_generator.h index 1ffdd39aee..21f7a4941b 100644 --- a/modules/navigation/navigation_mesh_generator.h +++ b/modules/navigation/navigation_mesh_generator.h @@ -52,7 +52,7 @@ protected: static void _add_vertex(const Vector3 &p_vec3, Vector &p_vertices); static void _add_mesh(const Ref &p_mesh, const Transform3D &p_xform, Vector &p_vertices, Vector &p_indices); static void _add_faces(const PackedVector3Array &p_faces, const Transform3D &p_xform, Vector &p_vertices, Vector &p_indices); - static void _parse_geometry(Transform3D p_accumulated_transform, Node *p_node, Vector &p_vertices, Vector &p_indices, NavigationMesh::ParsedGeometryType p_generate_from, uint32_t p_collision_mask, bool p_recurse_children); + static void _parse_geometry(const Transform3D &p_navmesh_transform, Node *p_node, Vector &p_vertices, Vector &p_indices, NavigationMesh::ParsedGeometryType p_generate_from, uint32_t p_collision_mask, bool p_recurse_children); static void _convert_detail_mesh_to_native_navigation_mesh(const rcPolyMeshDetail *p_detail_mesh, Ref p_nav_mesh); static void _build_recast_navigation_mesh( -- cgit v1.2.3