Rotate 2D light fix - #9005
Conversation
Update lightruntimeobject.spec.js test to expect SQRT2 scaled coordinates.
|
Hi! Thanks for submitting this. The tests seem to be failing, have a look at if you can see why? Thank you :) |
Already looking into it. Perhaps I need to change lighting test entirely, because of new lighting changes. |
now light mesh size changes based on rotation of light object
|
Are you confident this is now a 100% correct and minimal fix? |
Unfortunately, I don't know how to do this differently (I lack knowledge and experience), it just was the straightest way of doing it in my opinion. At first I just make so that texture rotated based on object angle, but I saw that quads just cutout the texture in some angles. Then I just make so that quads are bigger, but lighting test was failing because size of quads wasn't correct, so in the end I just make size of quads change based on object angle. |
|
How could we know if it's a good solution or if there is a potential other one that would be worth investigating? |
All other approaches that I could think of are either more invasive, less efficient, or less integrated with the existing light鈥憆endering. Actually, matrix-uniform approach might be slightly more elegant, especially if would need more complex transformations in future, but it would be kinda overkill and waste of time for such bug. I just want this bug fixed, it was driving me insane for years, and I even dropped some of my projects, because of this notorious bug. |
For many years, 2D light implementation had an issue, that prevented users from rotating it in GDevelop.
So, I fixed it.
https://forum.gdevelop.io/t/2d-light-object-texture-rotation/72909