anyone knows how to make “get_viewport().get_mouse_position()” position 0,0 to be in the middle?
i need it to be in the middle of the screen instead of the top left
heres my code:
extends TileMap
func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_CONFINED)
func _process(delta):
if Input.is_action_just_pressed("click"):
var mouse_pos = get_viewport().get_mouse_position()
erase_cell(0, mouse_pos)
print(mouse_pos)