Hello, I am having issues with lighting my sprite up using my torch object. That is, when I set the light at the same spot as the torch, the model will light up facing left. Then I flip the “container” to the right using a negative scalex value, and the player goes black (i have tested with flipx and same thing). I have also tested flipping all images in the container using negative scalex and flipx, same results. If I set the light source on the left side of the player, and don’t have the light follow the torch, my character will light up from both sides. Does anyone know what might cause this, or how I can fix this?
Some extra info, I am using dragonbones plugin to generate the model, which I am not sure how to add a “normal map” for. I think this might be part of the issue, but I am not sure why it would light up facing left if this was the case. Playing around with the code, I found a workaround for the missing normal map. If I do not add this code, the image will not show up at all.
$player.getAll().forEach(function(img:Phaser.GameObjects.Image){
img.texture.dataSource.push({}); //required for image to show with 2d pipeline
img.setPipeline('Light2D');
});
Torch facing left (works)
Torch facing right (doesn’t work)
Light source on left (works)
Light source on left facing right (works)