0 votes

I find myself in a position where I want to convert a global viewport position, to the position within a control node. I discovered that a node2d provides a method to_local (https://docs.godotengine.org/en/stable/classes/class_node2d.html#class-node2d-method-to-local) but that method does not seem to exist for control nodes. Is there another way

in Engine by (77 points)

1 Answer

0 votes
Best answer

I figured out a workaround. I added a child Node2D node into my control node and I call the to_local() from there and it works!

by (77 points)
selected by
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.