Tilemap.set_cellv lags my game when i set a tile with navigation

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

Hi I read that set_cellv does not update navigation when called and we need to call the update_dirty_quadrants to update the navigation, but it seems like it automatically updates the navigation even without calling update_dirty_quadrants which causes my game to hang every time I try to replace a tile using set_cellv. Did I miss a setting? Please help.

func _physics_process(delta):
        var m_MouseGPosition = get_global_mouse_position()
        var m_TileMapPosition = Vector2(
               floor(float(m_MouseGPosition.x) / float(64))
               ,floor(float(m_MouseGPosition.y) / float(64)))
        $tmLand.set_cellv(m_TileMapPosition, 1)

Here is the block of code thats giving me the problem. Any help is appreciated.

teddeleon | 2022-11-14 14:26

:bust_in_silhouette: Reply From: teddeleon

This is apparently an existing problem with the engine. See [3.5] possible performance regression with TileMap · Issue #64552 · godotengine/godot · GitHub

I tried making the giant tilemap into multiple smaller tilemaps but the problem still exists. I was hoping that only the affected tile map will cause the recompute but it doesnt appear to be that way, instead it recomputes the navigation across all tilemaps.

teddeleon | 2022-11-15 14:08