0 votes

Hello

I'm a beginner to GODOT and I'm doing the Pong tutorial. The Tutorial seems to be outdated?

Problem:
I can not get the poistion info of any sprite. In my Screenshot you can see the suggestions I have and get_pos() seems not to be one of them.

How to solve this problem or is the function placed elsewhere now?
enter image description here

in Engine by (15 points)

1 Answer

+2 votes
Best answer

That tutorial is old and outdated. You are looking at the 2.1 version of the docs.

The 3.0 docs are here: http://docs.godotengine.org/en/3.0/getting_started/step_by_step/index.html

BTW, you can choose the docs version at the bottom of the sidebar.

by (19,713 points)
selected by

Thanks.

I still want to built this Pong Game though. So the question remains: How can I retrieve the position of a node in 3.0 then?

Thanks in advance

In 3.0 properties may be accessed directly, rather than using get/set, so this would be:

Node2D.position

That said, I still don't recommend this tutorial. It was replaced for some very good reasons, and doesn't really introduce Godot well.

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.