#Can you apply lights on labels ?

1 messages · Page 1 of 1 (latest)

restive junco
#

For the game I'm making, I have a PointLight2D source following my mouse. I'd like to have text visible only when in the light source, but it seems labels can't react to light emissions ?

dusky cloak
#

all canvas items should be able to process light

#

How are the nodes setup?

restive junco
#

The huge black square being the Dialogue Balloon

dusky cloak
#

is the label text color white?

#

it won't become more white if a light is on it

restive junco
#

The label text color is white but the light color is red

dusky cloak
#

okay so the color property of the light is red?

#

okay so the documentation page on using 2d lights says to use a canvasmodulate to make the entire scene darker before using the lights

#

since the lights won't work if the scene isn't darkened first

restive junco
dusky cloak
#

get on top of the canvaslayer?

#

is the light on a different canvaslayer than the label?

restive junco
#

This is the Dialogue Balloon scene and the main scene

dusky cloak
#

well make the canvaslayer of the light higher than the canvaslayer of the text

#

the light won't affect anything that it is drawn under

#

canvaslayer has a layer property

#

higher values means it's drawn later

#

on top of the other nodes

restive junco
#

Isn't it the same canvasLayer ? I literally dragged my Canvas scene into the main scene

dusky cloak
#

not sure, i don't recognize the node the dialogue is

#

is it from a plugin?

restive junco
#

Yes, DialogueManager

dusky cloak
#

maybe that makes its own canvaslayer? Idk

#

make a new canvaslayer and add the pointlight2d as a child of it and set the layer to something really high

restive junco
#

Found a way !

dusky cloak
#

...it might not work if dialoguemanager has a higher canvas layer

dusky cloak
restive junco
#

Somehow changing this parameter on the light

#

But yeah, I'll look into the doc you sent me to make the whole scene dark, and I should be able to make the trick work

dusky cloak
#

👍

restive junco
#

So thanks