Thank You!
Let me see if understand
I use local_to_map() to get tile position on grid
and then i use map_to_local() to convert to a global position
Correct me if i misunderstood...
I'm tryng to read documentation about snapped() but my english still crawling (I wold stay greatful if you explain to me)
Then i made it on my code:
LastcollidedTileMap.gd
extends Area2D
@onready var player = $".."
func _on_body_exited(body):
if body.name == "TileMap":
var tile = body.local_to_map(player.global_position)
var PositionTile = body.map_to_local(tile)
Global.last_position_before_jump = PositionTile
Seems works fine, I passed a long time testing and the problem with the player reappearing on the edge of tile not happens again
but if you have a suggestion to improve mt code i will be greatful again xD