Issues with Godot Light and Canvas Modulate

Godot Version



Hey! I have been trying to make a game where everything is dark, and I’ve been having a couple issues. I made another thread about one of these issues. I was having a problem with darkness in Godot. We ended up fixing this with a MeshInstance2D and a CanvasModulate, instead of a ColorRect. This worked, but when I wanted to add a player, the Modulate turned it black. I fixed this by putting the collisions in the world, but the player sprite in the center of the map with a canvasLayer (the layer would cause issues with moving relative to the world/screen). Now, when I want to add a barrel to my game, I can’t seem to figure out how to put the barrel sprite into a canvas layer and still have it move around.

Any and all ideas for solving these issues would be greatly appreciated.

P.S. my previous thread is here.

If you don want a sprite to be affected by the light system then you can set its CanvasItem.material to CanvasItemMaterial and change the CanvasItemMaterial.light_mode property to Unshaded

1 Like