Attention | Topic was automatically imported from the old Question2Answer platform. | |
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):
if(Input.is_action_pressed("ui_mouse_click_left")):
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