TileMap and light occluder 2d

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Grizly

Hello everyone! I have a problem using TileMap and LightOcculder 2d. Previously I used tilesets without LightOcculder 2d.
Creating a tile looked like this: NewScena (Node2d → Sprite -parrent->StaticBody2D

  • parrent-> CollisionShape). Then I exported the tileset and used it when creating the level.
    Later I added LightOcculder 2d NewScena (Node2d → Sprite -parrent->StaticBody2D
  • parrent-> LightOcculder 2d, CollisionShape). After exporting the work, the LightOcculder did not work. What am I doing wrong?
    After a lot of manipulation, I decided to do it differently. Created a new scene with TileMap node to then add this scene to my level and build platforms.
    Process of creation:
    +New Single Tile, +Collision, + Occlussion.
    Occlusion began to work, but i got another problem.
    My character has wall collision raycasts. If 1_raycast = wall(true) and 2_raycast = wall(false), logic starts to hang on the ledge. I built a new level with a new tile map. Raycasts now check for a new wall and the character always tries to cling to the scene as if there are empty gaps between tiles and triggers to hang onto the ledge. Is this a bug or am I doing something wrong? My scene should be one piece, but it looks like there are gaps between the tiles and these gaps are determined by the raycast.
:bust_in_silhouette: Reply From: Grizly

I found the reason for the incorrect operation of the logic to hang on a ledge.
Raycast behaves differently with tile map and tile set. The reason is my disposition of district castes.
This is how the raycast behaves with a TileMap:

RayCast2D. is_coulliding() = true
…|
<-----
…|

RayCast2D. is_coulliding() = false
(When raycasting inside a collision, it evaluates to false)
…|
<— |
…|

RayCast2D. is_coulliding() = false
…|
…| <----
…|

This is how the raycast behaves with a TileSet:

RayCast2D. is_coulliding() = true
…|
<-----
…|

RayCast2D. is_coulliding() = true
(When raycasting inside a collision, it evaluates to true)
…|
<— |
… |

RayCast2D. is_coulliding() = false
…|
…| <----
…|

In my opinion, working with tilemap is not logical!