Fix LightmapGI baking with GridMap
(cherry picked from commit 8c26da5460
)
This commit is contained in:
parent
ff59871b86
commit
3d47a3662f
|
@ -371,7 +371,7 @@ void LightmapGI::_find_meshes_and_lights(Node *p_at_node, Vector<MeshesFound> &m
|
||||||
Node3D *s = Object::cast_to<Node3D>(p_at_node);
|
Node3D *s = Object::cast_to<Node3D>(p_at_node);
|
||||||
|
|
||||||
if (!mi && s) {
|
if (!mi && s) {
|
||||||
Array bmeshes = p_at_node->call("get_bake_bmeshes");
|
Array bmeshes = p_at_node->call("get_bake_meshes");
|
||||||
if (bmeshes.size() && (bmeshes.size() & 1) == 0) {
|
if (bmeshes.size() && (bmeshes.size() & 1) == 0) {
|
||||||
Transform3D xf = get_global_transform().affine_inverse() * s->get_global_transform();
|
Transform3D xf = get_global_transform().affine_inverse() * s->get_global_transform();
|
||||||
for (int i = 0; i < bmeshes.size(); i += 2) {
|
for (int i = 0; i < bmeshes.size(); i += 2) {
|
||||||
|
|
Loading…
Reference in New Issue