Lights not showing if light blocking object is at 0,0

If an object with Light Obstacle Behaviour has an edge that goes over the origin (0,0), then the light object does not show. The error message in the browser is :

If neither the X and Y positions of the Light Obstacle Behaviour object are 0, then the light object shows.

[edited] corrected the description as the edge has to go over the origin. A Light Obstacle can have an edge at 0 (X or Y) and have light objects work, as long as the edge doesn’t touch the origin.

1 Like

@MrMen I just noticed this issue and was about to post about it but I saw your post here, Have you found a workaround for this issue?

I have a light object and a square object, when the light object is inside the square object, the light don’t work or I’d say it feels like it’s stuck inside the square? I mean if we’re talking about real world, light should disappear completely when the square is blocking it completely, right?

I’m kind of confused about this one, here is a picture of what I mean:

1- Normal light behavior:

2- Not normal light behavior:

light2

I moved the offending object off the origin. It’s the only way I could get the light to show. For me the light didn’t show anywhere on the screen otherwise.

But for you, does the square light up but nothing around it if the light is within bounds of the square?

1 Like

@MrMen

Well it’s really weird, like sometimes the light completely disappear behind the object and other times the light feels like it’s stuck inside of the object and no light outside of the object (like in the second pic).

Like check this out >>> I already have 2 objects, they have the same behaviors and both act differently when the light is at 0,0 which makes no sense, one of them the light completely disappear when at 0,0 and the other the light gets stuck inside and both objects are identical in everything…

This is 100% a bug and I’m not really sure if there is anything we can do about it…

Yup that’s the only way so far but it’s not the best one you know, I’m not sure what is even causing this.

You got any thoughts around this?
I’m completely lost at this, tried so many things but nothing works.

Wait for the GDevelop devs, those who work on the game engine, have a fix in place.

Or keep away from 0,0 when you put things on the scene. Have the left most part of the scene at 100. Then all objects will be to the right of the origin, there shouldn’t be any more issues.