+1 vote

I want to set a Sprite2D node to the position of the mouse,
i tried doing:

Position = GetLocalMousePosition();

but it keeps flickering and it isn't and moves at mouse movement but isn't at the same position.

how would i do this?

in Engine by (33 points)

1 Answer

0 votes
func _physics_process(_delta: float) -> void:
    _sprite.global_position = get_global_mouse_position()
by (1,879 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.