0 votes

I want to use the method get_global_mouse_pos() but i have this error message:

Method get_global_mouse_pos() is not declared in the current class.
How i can declared a method in a current class?

Thank you.

in Engine by (218 points)
edited by

1 Answer

+1 vote
Best answer

you are using 2.x or 1.x method.
it is get_global_mouse_position() with godot 3.x
you can easily find with Search Help in editor.

by (9,712 points)
selected by

Thank you very much!

Just wondering, what was the solution because I am unable to find one and it keeps on repeating that it isn't declared. how should I declare it?

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 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 webmaster@godotengine.org with your username.