godot set tile

in #godot7 years ago

It is from godot 2d demo isometric

func _input(e):
    if (e is InputEventMouseButton
    and e.button_index == BUTTON_LEFT and not e.pressed):
        var gmpos = get_global_mouse_position()
        $floor.set_cellv($floor.world_to_map(gmpos),1)