From fdd6950fc12689c841e37b975466635ba7ae9781 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 3 Oct 2018 14:57:47 -0300 Subject: Fix lightmap baking crash, may close some issues but I am not sure. --- scene/3d/baked_lightmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index c58e318651..8f3fe8577e 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -365,7 +365,7 @@ BakedLightmap::BakeError BakedLightmap::bake(Node *p_from_node, bool p_create_vi { bake_bounds = AABB(-extents, extents * 2.0); int subdiv = nearest_power_of_2_templated(int(bake_bounds.get_longest_axis_size() / bake_cell_size)); - bake_bounds.size[bake_bounds.get_longest_axis_size()] = subdiv * bake_cell_size; + bake_bounds.size[bake_bounds.get_longest_axis_index()] = subdiv * bake_cell_size; bake_subdiv = nearest_shift(subdiv) + 1; capture_subdiv = bake_subdiv; -- cgit v1.2.3