Questions tagged [godot]
Godot is a 2D and 3D open source game engine developed by the Godot Engine community. It features a built-in development environment which runs on Windows, macOS and Linux and can create games targeting PC, mobile and web platforms.
599
questions
1
vote
1
answer
42
views
2d map of the world resolution (resolution problem and its effect on image quality when zooming.)
I'm developing a 2D grand strategy game in the style of Age of History and Paradox games using Godot v4. My current map creation method involves creating a background PNG image of the world map with ...
0
votes
1
answer
45
views
Multiplayer Game with Multiple Unique Rooms
I'm trying to make a multiplayer dungeon-crawl game. I have the ability to make it so that every client can be inside the same dungeon, but I want it so that players can be in separate dungeons with ...
2
votes
1
answer
56
views
Hard dropping blocks isn't instant and doesn't put it in the correct spot
Godot Version: v4.3.stable.official [77dcf97d8]
I'm trying to add the ability for blocks (frozen RigidBody2Ds) to be hard-dropped instantly (they get placed on the closest surface directly below them) ...
0
votes
0
answers
28
views
Textures embedded in a scene that are changed programmatically are not exported with the game
Using Godot 4.4.dev1, I have created two scenes that I use for my HUD. One for abilities and one for keyboard keys. Both have exported variables that contain information about textures that I load in ...
0
votes
2
answers
46
views
How to start animation only when a specific keymap is triggered?
I am working on a game where the player needs to open a door using a button.
A door open animation plays when the player clicks the button which triggers a keymap. So I used:
...
0
votes
0
answers
31
views
What is the difference between set_process and flag management?
I have experience in smartphone app development, and I’ve always avoided using flag management for asynchronous programming, including things like semaphores, due to the risk of deadlocks. Instead, I’...
0
votes
1
answer
24
views
A problem with PathFollow3D and camera
When the character follows the path, the camera stays still despite being a child node of the character.
The hierarchy and the PathFollow3D script:
...
0
votes
1
answer
78
views
How Does Y Sort Allow Partial Overlap with Objects in Godot?
I watched the video:
https://www.youtube.com/watch?v=60rpO_0CJII
Why is the character able to move behind the chair? I understand that it's thanks to Y Sort, but it seems to be applied to the entire ...
0
votes
1
answer
69
views
Setting up AI Pathing in Godot 4.3, NPC not moving but it is updating the pathing correctly
I am making a project in Godot 4.3 I am using a gridmap for the map and I have the NavMesh set up correctly, when I am in game I can get it to show me its pathing and it will update correctly ...
0
votes
1
answer
23
views
CharacterBody2D knockback not being applied in the correct direction
I'm having a problem with CharacterBody2D knockback in Godot 4.3 stable.
I'm creating a game where enemies (CharacterBody2D) can ...
2
votes
2
answers
26
views
Automate Godot Android Export Version Code Updating
I'm building a Godot mobile game and I'm trying to automate the export process.
I can export the game simply enough:
...
0
votes
2
answers
81
views
Godot 4 Static Storage Handling
I have a project that will have a significant amount of item/entity data. Imagine something like a survival game that will have items being dropped that can be used in recipes and building. There will ...
0
votes
1
answer
44
views
Translate global position into screen position taking into account camera zoom
I have a big 2D map. I need to move the player's cursor to a specific place on this map. And I know for sure that this place is currently visible on the screen.
I'm going to translate the position of ...
0
votes
0
answers
79
views
How can I perform hot reload in Godot?
In the documentation for versions 3.5 and 4.3, it mentions that hot reloading is possible:
3.5: https://docs.godotengine.org/en/3.5/getting_started/introduction/godot_design_philosophy.html
4.3: https:...
1
vote
2
answers
366
views
What exactly is component-based architecture and how do I get it to work?
My problems with OOP:
For a while now, I have been attempting to make full games on Godot, but I keep running into issues around poor organization and planning with my classes and OOP architecture. ...
1
vote
2
answers
194
views
Disconnecting Signals in Godot 4
The godot documentation provides examples of connecting Signals via code in the _Ready lifecycle method here (I'm using C#).
However, these examples do not show the handlers being disconnected when ...
0
votes
1
answer
119
views
How to calculate the center of mass of a irregular polygon in Godot?
Or to calculate the centroid of a 2D polygon assuming uniform mass density, which is my case. The polygon can be either concave or convex.
1
vote
1
answer
114
views
How to calculate the surface area of a irregular 2D polygon in Godot?
I have a irregular 2D polygon, it is a PackedVector2Array, how do I get its area?
1
vote
0
answers
29
views
"Node not found" when using Third Person Controller plugin in Godot
I'm trying to add a 3rd person plugin for Godot 4.2. It's my first game using Godot so I'm fairly new to it. I'm guessing I'm just doing something wrong.
I'm trying to use this Third Person Controller ...
0
votes
1
answer
67
views
Rotating Projectile in Godot engine
I have this projectile code in Godot:
...
0
votes
1
answer
51
views
Passing a single float into a Vulkan compute shader in Godot
I have written a compute shader to convert a height map into a normal map.
The shader definition (glsl) starts as follows:
...
1
vote
1
answer
107
views
How To Check Collision In Godot 4?
I am making a 2D game where I need to check if any "specific" object is colliding with another "specific" object in order to change it's behavior. I know that you can check ...
1
vote
1
answer
41
views
Godot scene immediately unloading when added to tree
I'm working on a small platformer game to learn Godot, and I have a main scene which is just a menu with a "start" button. The levels go from 0 to 3, and a "level complete" screen ...
2
votes
1
answer
44
views
Escape Block Textures Not Loading After Leaving First Room
Godot Version: v4.2.stable.official [46dc27791]
I am trying to have an escape block with a TextureRect that has two different textures--an animated one where it's ...
0
votes
0
answers
47
views
Walking through a portal attached to a wall
I have created portals that work perfectly fine. I walk into one and come out the other side seamlessly. The problem I am having, though, is when the portal is up against a wall my player (A ...
0
votes
0
answers
38
views
Dynamic Knock Back Force Based on Collider Velocity
I'm making a game prototype in Godot. My player character is a ship that moves around in 3D space without gravity. I have some simple code that adds a knock back force to the player on collisions ...
0
votes
1
answer
36
views
Godot Blend Space 2D: Animations reset from start when blending discretely
Godot Version: 4.2.1 Mono
How do I blend between animations in a Blend Space 2D while maintaining the playback point of animations? I don't want animations to restart each time I blend between them.
I ...
0
votes
0
answers
25
views
How to match Sprite3D's collision poly to its billboard transform?
Assume there is a Sprite3D with a Y- billboard flag on.
This sprite3D has a matching CollisionPolygon3D
Collision polygon3D is set up to "look" at the camera with a look_at() function, ...
0
votes
1
answer
66
views
How to prevent Sprite3D from clipping into nearby objects?
Gotot 4.2
Sprite3D is very useful for representing 2D objects within the gameworld. However, when billboarded (Y-billboard), 3D Sprites are prone to clipping into the floor/walls/other 3D models they ...
0
votes
1
answer
104
views
My Godot 4 2D game is running badly on HTML5 on some PCs
I'm using Godot 4.2.1 and my game is a pretty simple top down shooter. I tried exporting to HTML5 on Itch.io and the game runs fine on certain PCs but not others ?...
when running the game on my ...
2
votes
2
answers
296
views
Area2D embedded in UI does not receive mouse events
I am using a hierarchy of Control nodes (in a CanvasLayer as was suggested in another question) to display a user interface.
At ...
0
votes
1
answer
57
views
Godot on signal trigger external animation
It may not matter, but I'm following How to make a Video Game - Godot Beginner Tutorial. I want to implement the dying animation instead of removing CollisionShape2D from the body (parameter passed to ...
0
votes
2
answers
108
views
Cannot figure out how to properly align content with resizing window
I'm trying to create a Godot game that runs in a resizeable window. The larger the window, the more of the game world players should be able to see - i.e. I do not want the game graphics to get scaled ...
0
votes
2
answers
143
views
How to prevent the "_ready" events and pre-ready var declarations in a loaded, instantiated scene?
I have a simple save game/load game system that packs the entire world scene to the disk, then loads it via ResourceLoader.load():
...
2
votes
1
answer
59
views
Theme lookup in Godot 4.2
Trying to understand how theme lookup works in Godot 4.2. Suppose a Control node script has the following two lines in it:
...
1
vote
1
answer
63
views
How can I constrain a RigidBody ball to move along a path, but only apply forces to keep the ball on the path without adding velocity?
I'm currently working on a game and I'm hung up on this particular issue.
I have a ball that is a RigidBody. The RigidBody is ...
0
votes
0
answers
29
views
Inconsistent results from ApplyCentralImpulse with RigidBody2D
I'm working on a 2D top-down game using RigidBody2D for the player and enemies. They're bouncing and moving (using ApplyCentralForce) and detecting collisions just fine, however now I want to add a ...
1
vote
0
answers
152
views
making a 5 minute Metroidvania prototype and wanna know if my dev process is good
I've been learning Godot and game dev as a whole since the start of this year and I've sunk dozens of hours into practicing making games in it, lately I've set out to make a very small sort of "...
0
votes
1
answer
393
views
adding a knockback effect to a CharacterBody2D in Godot 4.2.1?
i was following a tutorial series on YouTube on creating a Zelda clone in Godot 4.2.1 and everything works fine, but the tutorial never implements a knock-back effect when attacking an enemy so i ...
1
vote
1
answer
150
views
How do I place the local center of my tilemap at 0,0?
If I have a tilemap that is 4x8, positioned at 0,0 in the editor as follows:
What code would I use such that it ends up "centered" when my game runs?
I'm hoping for an end result that would ...
1
vote
1
answer
168
views
Is it possible to set properties on a scene in a TileMap/TileSet?
If I have the following:
sample of code showing exported properties:
[Export]
public TileSet TileSet { get; set; }
[Export]
public string TileName { get; set; }
...
0
votes
1
answer
133
views
Stray (orphaned) nodes remain after queue_free() of their parent scene
Godot 4.2.1
I have implemented a simple scene-save system:
The Savegame Autoload listens for the S key press.
When S is pressed, the ...
0
votes
1
answer
81
views
How to convert a dynamic VIewportTexture to a "static" one?
Assume there is a viewport that "looks" at some Sprite2D.
This viewport's view is providing the texture for a Sprite3D ...
1
vote
1
answer
214
views
Momentum for a First Person Controller in Godot 4
My First Person Controller (CharacterBody3D) currently has no momentum at all. By the way, I measure my movement speed in the debug panel (hotkey ~) with ...
0
votes
1
answer
68
views
How to get around mouse entry signal stopping at first collision?
I have a grid of Area3D objects, and when nothing is around them, they handle the mouse_entered signal exactly as I would expect. The only issue is that I also use Area3D's on other game objects, like ...
0
votes
2
answers
115
views
FP Movement along the wall makes the character move faster and glitches out a little
First Person Movement along the wall makes the character move faster and glitches out a little.
The problem is pretty much visible here:
https://youtu.be/_1dDdCSwVEo
Source:
https://github.com/...
0
votes
1
answer
89
views
Assigning Color Won't Work
I am trying to make a palette-swap shader. Here is my code:
...
0
votes
0
answers
103
views
How to efficiently path many objects to a moving point?
Working in 3D in the Godot engine, I have an object that moves through space and, like a tornado, is intended to pick up objects in its path.
What I have right now is janky, effectively re-baking the ...
1
vote
2
answers
326
views
Efficient storing of tabular user generated data in Godot
Over the course of the game, the user generates a lot of very simple data. And array of strings (single letters), timestamps (int) and a boolean array, all equal in size. The length of this "save ...
1
vote
0
answers
88
views
What exerts a force on my rigidbody?
I'm trying to create a simple 2D scene with two rigidbodies, which are connected by two pin joints.
There is one large rigidbody, a green circle, which is slowly rotating at a constant speed (as its <...