Browse Source

[godot] Apply light mask of sprite to mesh instances, closes #2197.

Mario Zechner 2 years ago
parent
commit
0a14457f36
1 changed files with 1 additions and 0 deletions
  1. 1 0
      spine-godot/spine_godot/SpineSprite.cpp

+ 1 - 0
spine-godot/spine_godot/SpineSprite.cpp

@@ -536,6 +536,7 @@ void SpineSprite::update_meshes(Ref<SpineSkeleton> skeleton_ref) {
 		spine::Slot *slot = skeleton->getDrawOrder()[i];
 		spine::Slot *slot = skeleton->getDrawOrder()[i];
 		spine::Attachment *attachment = slot->getAttachment();
 		spine::Attachment *attachment = slot->getAttachment();
 		MeshInstance2D *mesh_instance = mesh_instances[i];
 		MeshInstance2D *mesh_instance = mesh_instances[i];
+		mesh_instance->set_light_mask(get_light_mask());
 		clear_mesh_instance(mesh_instance);
 		clear_mesh_instance(mesh_instance);
 		if (!attachment) {
 		if (!attachment) {
 			skeleton_clipper->clipEnd(*slot);
 			skeleton_clipper->clipEnd(*slot);