+1 vote

I was following a tutorial in youtube but godot 3.0 doesn't have this function
in Area2D.
Is there another function with the same utility.
Sorry, English is not my first language.
I'm from Brazil and I started to learn godot today!

in Engine by (20 points)

Stop apologizing for your English! Every sentence you said is perfectly constructed. Really, not being rude, but nobody cares if you're Brazilian and started to learn Godot today.

2 Answers

+3 votes
Best answer

In Godot 3, properties were renamed from pos -> position, rot -> rotation, etc.

You also don't need to use the setter function, you can access the property directly:

Area2D.position = Vector2(x, y)

The details are all in the documentation. See Area2D and Node2D.

by (18,443 points)
selected by

Thanks, really thanks
I helped me a lot But I had a problem with the logic of the Cartesian plan as well.
I was able to solve with your tip. And I already saw your videos on the youtube!

thank you for your help.
can i ask one too, i watch tutorial at GDQuest that he wrote set_opacity() for GridVisualizer at Godot 2 (i think). and now we have Godot 3.2.

so i use set_opacity() it get error "the method isn't declared in the current class".

are you understand this problem too ?

Opacity is controlled by the alpha (A) channel of the modulate property. You can change "Modulate" in the Inspector, or in code like this:

modulate.a = 0.5

Oh so i dont need to set_opacity at code right ?
because it have at inspector

You can do it in the Inspector or in code, depends on what you need.

0 votes

But I said this because many other foruns on the net, people don't want to answer questions for people who can't express your ideias well

by (20 points)

You could've commented on your question. True, nobody is able to answer something they don't understand, but you certainly express yourself 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.