I am setting an area 2D node to the position of the mouse in order to check if the mouse is inside another area2D node. My area2D is lagging behind the mouse. Is there a way to fix this or another more accurate way to check if the mouse is inside an area2D?
Code:
func _process(delta : float) -> void:
position = get_viewport().get_mouse_position()