Whenever I create bodies in love.load I get normal shadows as on first screenshot. But whenever I create bodies from other places in code it gives me situation like on second screenshot.


I create body for each square (have no idea how to optimize this), the blue square in center is light source.
There's no problems with global variables.
Any suggestions on the problem?
Whenever I create bodies in love.load I get normal shadows as on first screenshot. But whenever I create bodies from other places in code it gives me situation like on second screenshot.


I create body for each square (have no idea how to optimize this), the blue square in center is light source.
There's no problems with global variables.
Any suggestions on the problem?