Hot answers tagged

20 votes
Accepted

How can I remove Godot's splash screen?

Go to Scene > Project Settings > Application and change the boot_splash property.
Timo Schwarzer's user avatar
14 votes

How do I programatically lay tiles with the Godot engine?

You can programmatically set a cell in the TileMap class by using the set_cell function. Note: if you're new to an engine & ...
Pikalek's user avatar
  • 10.9k
14 votes
Accepted

Concept of "scene" in Godot, misunderstanding

The term "scene" in the context of Godot is kind of a misnomer. What a "scene" actually is in Godot is a reusable object template you can instantiate multiple times. You can edit ...
Philipp's user avatar
  • 118k
12 votes

What's the appropiate way to achieve composition in Godot?

I have gone from a monolith player controller, to an state machine, to a behavior tree, to something closer to what you describe. My current character controller looks something like this in the scene ...
Theraot's user avatar
  • 24.4k
11 votes
Accepted

How do I access a variable from my code in Godot's editor?

This can be done with the export keyword. export var my_var = 5 # No default value export(int) var my_int The result of this ...
TARDIS Maker's user avatar
11 votes
Accepted

How can I change the default New Project directory in Godot Engine?

This setting is inside the project editor, so you'll first need to create or open a project. Then: From the toolbar, open Editor Settings In the sidebar of Editor Settings, go to Filesystem → ...
doppelgreener's user avatar
10 votes
Accepted

Difference between _process(delta) and _physics_process(delta)?

I made an more in depth explanation on GitHub: link. Graphics or Physics One difference is that _process is tied to graphics (it runs once per frame), while ...
Theraot's user avatar
  • 24.4k
9 votes

Simple message box in gdscript / godot

You can use the OS / platform's alert system: OS.alert('This is your message', 'Message Title') You can use ...
hola's user avatar
  • 311
8 votes
Accepted

How to use C# 8.0 with Godot 3.3.2?

The issue was coming from TargetFramework! If the option .net5.0 is not supported by Godot, there is another option to have full System.Runtime feature of C# v8 <...
pietrodito's user avatar
8 votes
Accepted

Is there a do-while loop in GDscript?

Is there a do ... while (condition) loop in GDscript? There isn't. The documentation does not mention anything like that, as you found out. I have some code that ...
Theraot's user avatar
  • 24.4k
7 votes
Accepted

GET and POST requests in gdscript

As someone else said, check out the HTTPClient class. It's nonblocking, so you'll need to check for when it's finished. A barebones example with no error checking would be the following: ...
Jaxkr's user avatar
  • 194
7 votes
Accepted

How can I reference C# objects in GDScript (and vice versa)?

I figured out how this works both ways after a couple of days. It is not immediately obvious and the GDScript interpreter will yell at you, but as long as your C# objects are included in the .csproj ...
JSON Brody's user avatar
7 votes
Accepted

How to get current Microphone Frequency in Godot

Getting Microphone Input To have microphone audio input in Godot: Go to Project -> Project Settings -> General -> Application -> Audio and make sure "Enable Audio Input" is On. ...
Theraot's user avatar
  • 24.4k
7 votes
Accepted

How to disconnect all signals of an emitter?

You can get the list of signals with get_signal_list: ...
Theraot's user avatar
  • 24.4k
7 votes
Accepted

Are Yields a Bad Code Practice in GDScript?

Code Smell We have a term for what you describe: it is a code smell. Sometimes yield can be an indication of a bigger problem. Also there are cases where using <...
Theraot's user avatar
  • 24.4k
7 votes
Accepted

_ready(): Node not found: "Pivot/Camera" + player falls through the floor

On picking your tutorials You seem to have been mixing Godot 3 and Godot 4 tutorials. So be careful which one the tutorial is for. Chances are that tutorials prior to Godot 4 don't specify. At the ...
Theraot's user avatar
  • 24.4k
6 votes
Accepted

How to check if objects are hidden in godot

From a Godot QA post there should be a method is_visible(). Try get_node("node").is_visible(). Looking at the docs this method ...
Charanor's user avatar
  • 7,790
6 votes
Accepted

How to control jump strength by how long the player presses the jump button?

You have essentially 2 options. You can either apply a constantly decreasing force to the character while the player is pressing the space button and stop immediately when they release it or apply a ...
Bálint's user avatar
  • 14.8k
6 votes
Accepted

Does collision between two Area2D work differently than collision with Rigidbody2D?

Does collision between two Area2D work differently than collision with Rigidbody2D Yes. the collision between Player and Trap (Area2D vs Area2D) does nothing. Is it expected? Yes. We have three ...
Theraot's user avatar
  • 24.4k
6 votes
Accepted

How to know if an overriden method calls its super method or not?

On the mechanism of Ready The underlying mechanism for Godot calling _ready are notifications. What a script observes is the following: Godot calls ...
Theraot's user avatar
  • 24.4k
6 votes
Accepted

How to raycast down to the floor plane to determine world space coordinates in Godot

I'm not sure I understand your limitations, so I will give you a few approaches, and hopefully this gets you to the solution along the way. This is not an exhaustive list. Pickable Object If you have ...
Theraot's user avatar
  • 24.4k
6 votes
Accepted

How can I bake 2D sprites in Godot at runtime?

So you let the player select a series of sprite sheets. And there is some order in which you overlay them to create the sprite sheet of the player. Image manipulation at runtime We can create an <...
Theraot's user avatar
  • 24.4k
6 votes

How do child/parent nodes work in Godot?

clearly a child node doesn't inherit the class of its parent or anything. It does seem to be...maybe not "inheriting," but affected in some way by the transforms, visibility, and so on of ...
Theraot's user avatar
  • 24.4k
6 votes

How to break out of nested loops?

Option1 Use an extra bool flag to break ...
Mangata's user avatar
  • 2,271
5 votes
Accepted

Why Godot over Cryengine, UE4, Armory3d or Unity3d?

Although usually questions like "what software is better" are off-topic, because the answer is almost always "try them all, and pick your favourite", I think this one could be an exception so I'll ...
TomTsagk's user avatar
  • 4,616
5 votes
Accepted

Godot: how to use _draw to draw textures at an angle

You can use draw_set_transform to set the position, rotation, and scale of all following draw calls: ...
rcorre's user avatar
  • 863
5 votes
Accepted

No AA support in Godot 3.1?

Still Godot 3.1 doesn't support FXAA, however there are some user implemented version. If you are using GLES3, use this: https://gist.github.com/cart/7d2da58eb28c75c0952787f29f3e562f If you are ...
modernator's user avatar
  • 1,183
5 votes
Accepted

I cannot save my game data on Godot Engine

Your WriterReader is calling get_tree while it is not part of the SceneTree. You could do ...
rcorre's user avatar
  • 863
5 votes

Godot: How do I get the id mask for a physics layer by name?

Just a demo in an empty node - range starts with 1 up to the number of layers It creates a dictionary where you can access with layer name and get the number as 2 to the power of layer number - run ...
Daniel Kukula's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible