Browse Source

Fix lightmap baking crash, may close some issues but I am not sure.

Juan Linietsky 7 years ago
parent
commit
fdd6950fc1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/3d/baked_lightmap.cpp

+ 1 - 1
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);
 		bake_bounds = AABB(-extents, extents * 2.0);
 		int subdiv = nearest_power_of_2_templated(int(bake_bounds.get_longest_axis_size() / bake_cell_size));
 		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;
 		bake_subdiv = nearest_shift(subdiv) + 1;
 
 
 		capture_subdiv = bake_subdiv;
 		capture_subdiv = bake_subdiv;