Godot: Light2D does not work across or inside CanvasLayers.

Created on 6 Mar 2019  路  2Comments  路  Source: godotengine/godot

Godot version:

b63c506

OS/device including version:

Win10 64-bit GeForce 9600 GT

Issue description:

When putting a Light2D or Node2D into another CanvasLayer, there is no longer a way to use Light2D nodes. They only operate on the default canvas layer, no matter where they're located.

This currently makes these features impossible to use together.

Here depicts a sprite getting both lights, and the other getting neither. Though the lights are contained in their respective canvases.
image

The problem exists in GLES2 and GLES3, in game and in editor.

Steps to reproduce:
Add a CanvasLayer and try out combinations of nodes and lights. You will notice the lights disregard the CanvasLayer that is their parent.

Minimal reproduction project:

3.1 Light2D CanvasLayer.zip

archived

Most helpful comment

You need to set the Light2D Min Layer and Max Layer ranges correctly.

All 2 comments

You need to set the Light2D Min Layer and Max Layer ranges correctly.

Thanks, my mistake. Misunderstood these, didn't realize they were canvas layers.

Was this page helpful?
0 / 5 - 0 ratings