Just a short question this time. How would you make the camera limits the same as the tilemaps? (Like the camera cannot go past the tilemap?)
edit: alright this is the code I have for the boundaries so far
func _ready():
var tilemap_rect = get_parent().get_node("TileMap").get_used_rect()
var tilemap_cell_size = get_parent().get_node("TileMap").cell_size
$Camera2D.limit_left = tilemap_rect.position.x * tilemap_cell_size.x
$Camera2D.limit_right = tilemap_rect.end.x * tilemap_cell_size.x
$Camera2D.limit_top = tilemap_rect.position.y * tilemap_cell_size.y
$Camera2D.limit_bottom = tilemap_rect.end.y * tilemap_cell_size.y
pass
and it seems to work for now, so I will mark this question as answered. Thank you everyone ( I found a tutorial for this )