Label node following mouse

Godot Version

v4.4.1.stable.official [49a5bc7b6]

Question

I have a Label node that shows some information and the label position should follow the mouse with offset. I put this simple code. Label follows the mouse (with offset), but if I move mouse quickly, the label follows the mouse with a delay, as if I used a lerp.

It’s not necessarily undesired for my use-case, but I’d like to understand why it’s happening.

extends Label

var offset : Vector2 = Vector2(30,45)

func _process(delta: float) -> void:
	position = get_global_mouse_position() + offset

That’s unfortunately the problem you can’t really solve. See here a similar topic with a thorough explanation.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.