0 votes

So I've got a texture, a black backround, and the light is not hidden in any way. yet its nowhere to be seen
it also makes the light gray shadow on my character dissapear
here is a screenshot

in Projects by (63 points)

There is no screenshot. Can you add one?

does this work?

one more thing worth mentioning, the backround is behind the light

2 Answers

0 votes

The way Light2D works is that it brightens the image. You pick a texture for the Light and wherever that texture overlaps with a sprite, the sprite becomes lighter. That means that you can only light objects which are darker than the Light itself. Your sprite is already white, which is the brightest of colours. Therefore, it does not appear lit. You can play with the modes and the colors and see if anything does the trick for you, but do not expect white to become whiter.

What you can do is choose the Mix mode from the Mode menu and set a colour for your Light. Then you can increase the intensity of the Light which will cause the white sprite to bacome tinted.

by (1,817 points)
edited by

I need to light the objects around the sprite. The pc is a light source

I'm afraid this dosen't work. i can see the Player changing, but not the things around it. I just need a halo of light around the player...

There may be more advanced ways of doing this (like with mask for example), but why don't you place a sprite with an alpha as a child of your character? That will give the halo effect. The light will do its job lighting the surroundings and the halo sprite will be used for the effect.

0 votes

Light2D>Range>Layer min
If it's 0, modify the value from 0 to -1. I had the same problem yesterday and that seemed to work.

by (88 points)

Hello! Thank you so much! But for some reason it still does not work! It no longer brightens my player but it dosen't brighten the backround either :/
here is a screenshot

ohh i thought that it didn't brighten the background,i couldn't tell from the first screenshot

see here - it's a clip from youtube, and it shows how can you make a sprite not brighten. Maybe you can use that video to try something for your game,maybe you can make it work.(and make the value from layermin back to 0)

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories