Hi everyone!
I have w really weird problem (I'm quite new to Godot).
I have a kinematic body (player) moving on a tilemap. I'm detecting tile ID that player's raycasts are coliding with and it works, except for on the left side of the player. From what I found out, collision position is "rounding" to the next (to the right) map tile, which makes me get ID of the tile I'm being "in", instead of the one on the left (everything works fine for detection on the right and down).
Here's few screenshots to show the problem:
img1 - character, collision polygon, raycasts (they are in weird positions but work perfectly, I tried to change them in many ways, nothing works)
img2 and 3 - detection on the right works fine
img4 - on the left, I detect an empty tile
img5 - detection works for a moment mid-jump (going up)
img6 - I "fixed" the problem by creating two more raycasts more on the left.
I check if the casts close the player colide, then I getcollisionpoint()) of the ones more on the left. It's not elegant, but seems to work.
img7 - well, it does work, unless I enter the tile from above
img8 - entering from the side works

In player script:
if c_castL1.is_colliding():
emit_signal("left_rays", c_castL1.get_collision_point())
if c_castL2.is_colliding():
emit_signal("left_rays", c_castL2.get_collision_point())
"ccastL1" means "climb raycast left" (since I use them to detect ladders that I can climb on)
In main script:
var left_tile
func _ready():
player.connect("left_rays", self, "_left_rays_collide")
func _left_rays_collide(pos):
left_tile = (map1.get_cellv(map1.world_to_map(pos)))
print(left_tile)
Any ideas how to go around that problem? I was thinking, maybe there's a way to get a tile id minus one tile to the right.