[SOLVED] Weird bug when using Light Texture

I may be missing some point here, hence the Open Topic section.

So the scene has a Light has radius of 50 and a light sprite (yellow circle). The other object has a black sprite with a custom collision mask shaped like the sprite itself and also has Light Obstacle behaviour.

When the light obstacle is inside the light texture, it works somewhat correctly

“Somewhat” because the texture (light ray) stretched out a bit here too
image

But when it’s outside that texture, it renders like this video shows

is this a bug? Or am i missing some logic behind this why it’s working this way?
Thank you

1 Like

[edit]
Ahh, I think I’ve completely missed the point of your post, hence this large edit.

How have you set this up? I tried recreating what you have, and it works fine. What are the settings for your lighting layer, and your light object?

image

No, wait, I got it :

image

In the previous post, the circle sprite was 200x200.

For this post, it’s 50x50.

A circle sprite of 40x40 also has the same issue…

This looks like a bug.

2 Likes

EDIT: Looks like I jumped to conclusion too early, it does happen…

The issue is still open in github Light with Texture doesn’t work properly when touching Light obstacle object

But this issue seems to have been fixed in release 122 though, can anyone please test this??

(Last time I checked in release 121, I had Windows 8.1, this time I have Windows 10 in the same computer, so I am not sure if this was fixed but I don’t seem to recall seeing anything about this being fixed in the release notes either)

@pop-boi Can you send us a project with what you showing us please?

1 Like

Okay, I have recreated the Project, please note that for some reason that seems to be related to the sprite itself (not the size but what portion of it is transparent i think?), the Yellow light behaves like a normal light (without a texture) does, but all the other lights are still buggy…

Download Link: https://drive.google.com/file/d/15Qd1pmyRMkIwtG8sqCo_lkA76n9YmZnD/view?usp=sharing

Strangely the problem only occurs on textures that touch the edge of the image.

For your information:
On the black square you have a transparent margin all around.
The lights do not act on the transparent pixels.
It is the hitbox that is taken into account for the lights.

I bumped an existing issue with your project and an example.

1 Like

Thank you for updating the github issue… About that black box… I noticed it and filled the whole image to black and the result was the same so I didn’t update here…