Player under occlusion I dont want

Godot Version

version 4.3

Question

Hello everyone and most of all thanks for your time,

For my first top-down game I’m trying to have some cool lighting on my walls. Every things work nearly perfectly but when the center of my point-light 2D that follow my character enter in an occlusion layer from my TileSet, the character is also touch by the occlusion as in the picture below. (If there is no picture XD : the character is dark where he touch the tile)

Now I will do my best to explain you my game structure.

Node2D dungeon :
- payer :
- objects for a player
- sprite 2D light (a container actually) :
- point light 2D light_for_wall, range item cull mask = 2, shadows off
- point light 2D light_for_ground, range item cull mask = 1, shadows on
- Node2D room :
- tileMapLayer ground
- tileMapLayer walls (has a tileSet with occlusion layer on light mask 1)
- canvasModulate shadows

I don’t think there is something more interesting. If you want more informations don’t hesitate.

Kinds regards,
Pierre

The indentation goes wrong so here is the correction :

Node2D dungeon :

  • player :
    • objects for a player
    • sprite 2D light (a container actually) :
      • point light 2D light_for_wall, range item cull mask = 2, shadows off
      • point light 2D light_for_ground, range item cull mask = 1, shadows on
  • Node2D room :
    • tileMapLayer ground
    • tileMapLayer walls (has a tileSet with occlusion layer on light mask 1 and I set the visibility light mask on 2)
    • canvasModulate shadows