0 votes

I get the 'Node not found: guy' when I run the scene. How do fix this?


in Engine by (21 points)

1 Answer

+1 vote
Best answer

When you operate from the root of your node, you don't need to use get_node() method. So in your case it would be just get_pos(). If guy node were a child of another node, you'd use get_node('guy') then.

Oftentimes you'll also need to initialize variables that require nodes to be ready before accessed (added to parent), so you'd write:

onready var guy = get_node('guy')
by (1,356 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 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.